What is the output for the following program
#include<stdio.h>
main()
{
char a[5][5],flag;
a[0][0]='A';
flag=((a==*a)&&(*a==a[0]));
printf("%d\n",flag);
}
Answers were Sorted based on User's Feedback
Answer / sri
output is 1 but this prg display 2 warning (ie) Nonportable
pointer comparsion
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / vignesh1988i
FLAG WILL give zero.....
because a refers to the 2D array's base address, *a refers to the value at the 0th row and 0th column.... so this address will not match the ascii value of the char 'A'.... so however it is logical AND so, the value is 0.........
thank u
| Is This Answer Correct ? | 4 Yes | 1 No |
main() { printf("hello"); fork(); }
When should you use a type cast?
What does extern mean in a function declaration?
What is function prototype in c with example?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
What is the difference between array and pointer in c?
hello friends what do u mean by BUS ERROR i got this error while i am doing my program in DATA STRUCTURES
Is it cc or c in a letter?
swap 2 numbers without using third variable?
What language is c written?
What are the features of the c language?
Add 2 64 bit numbers on a 32 bit machine
3 Answers EMC, Hyderabad Central University, NetApp,