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);
}
Answer Posted / 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 |
Post New Answer View All Answers
What is I ++ in c programming?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What is the difference between declaring a variable and defining a variable?
what is stack , heap ,code segment,and data segment
Why is c not oop?
What are extern variables in c?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
What is the use of a ‘ ’ character?
Explain how are 16- and 32-bit numbers stored?
What is data type long in c?
What is the use of getchar() function?
Explain how can I open a file so that other programs can update it at the same time?
How do you do dynamic memory allocation in C applications?
Can you write a programmer for FACTORIAL using recursion?