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 Java Programming
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:

"Everything should be made as simple as possible, but not simpler."
- Albert Einstein
1. 

Declare the following statement?
"An array of three pointers to chars".

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

Answer: Option B

Explanation:

No answer description available for this question.


Dhiraj said: (Wed, Sep 22, 2010 12:00:15 AM)    
 
What you have marked as answer is a pointer to an array of three character the correct answer will be char (*ptr)[3];

Bhavani said: (Thu, Dec 2, 2010 02:01:52 PM)    
 
Yes (*ptr)[3] is correct.

Tamil said: (Sun, Dec 19, 2010 10:37:30 AM)    
 
Yes. You are right. Ptr is the array which contains 3 character pointer.

Nagaraj said: (Thu, Dec 30, 2010 05:29:28 AM)    
 
char *ptr[3]; It is an array wich consists of pointers.
int *(ptr[20]); It is the pointer to array of 10 elements

Nishu Nishant said: (Fri, Dec 31, 2010 06:03:50 AM)    
 
yes b option is correct *ptr[3]
*(ptr[3])is a pointer to array of 3 elements
where as *ptr[3] is an array consists of 3 pointers.
agreed with nagraj..

Raj said: (Wed, Jun 1, 2011 10:10:18 AM)    
 
Option b is absolutely correct no discussion at all.

Richa Rao said: (Sun, Jul 10, 2011 01:11:29 AM)    
 
It must be *ptr[2] as index start from 0th position.

Kavinder Singh said: (Tue, Sep 20, 2011 11:17:44 AM)    
 
Yes b option is correct *ptr[3]
*(ptr[3])is a pointer to array of 3 elements
where as *ptr[3] is an array consists of 3 pointers.
agreed with nagraj and nishu

Raju said: (Thu, Feb 9, 2012 04:35:08 PM)    
 
char *ptr[3] is correct. There is 3 characters are defined in pointers.

Write your comments here:
Name *:     Email:


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

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