IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C++ Programming C# Programming Java Programming
Microbiology Biochemistry Biotechnology Biochemical Engineering
Civil Engineering Mechanical Engineering Chemical Engineering Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - Complicated Declarations - Discussion

@ : Home > C Programming > Complicated Declarations > General Questions - Discussion

Read more:

"If you judge people, you have no time to love them."
- Mother Teresa
3. 

Declare the following statement?
"A pointer to an array of three chars".

[A].
char *ptr[3]();
[B].
char (*ptr)*[3];
[C].
char (*ptr[3])();
[D].
char (*ptr)[3];

Answer: Option D

Explanation:

No answer description available for this question.


Vishakan said: (Sun, Jan 23, 2011 04:50:32 AM)    
 
Hi could any one help me how?

Guest said: (Sat, Jul 30, 2011 03:35:04 PM)    
 
An array of 3 characters is declares as a pointer this way only.

Anjali said: (Wed, Aug 3, 2011 11:06:16 PM)    
 
Here we should have 3 characters only but not pointers. To declare any pointer we can have the syntax like char a[3]. So here a is an array which can contain 3 characters. We are asked for pointer to array of 3 characters. So to declare it char (*ptr) [3] is the correct one. Where ptr is a pointer to an array which contains 3.

Ganesh said: (Thu, Aug 30, 2012 08:57:04 AM)    
 
Here we should have 3 characters only but not pointers. To declare any pointer we can have the syntax like char a[3]. So here a is an array which can contain 3 characters. We are asked for pointer to array of 3 characters. So to declare it char (*ptr) [3] is the correct one. Where ptr is a pointer to an array which contains 3.

Dishendra said: (Mon, Jun 3, 2013 11:42:13 AM)    
 
See if there was no star symbol then it would have been, array of 3 character. Now since since star is within parenthesis that operation is applied to whole array. So, it is pointer to array of 3 characters.

Write your comments here:
Name *:     Email:


© 2008-2013 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: info@indiabix.com     Follow us on twitter!