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 |
Why are algorithms important in c program?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
Is c procedural or object oriented?
What is the mean of function?
Can include files be nested?
what is ur strangth & weekness
0 Answers Cognizant, LG Soft, NetEnrich,
How can I find the modification date and time of a file?
Difference between fopen() and open()?
how can we use static and extern?and where can we use this?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
main() { int x=10,y=15; x=x++; y=++y; printf("%d %d\n",x,y); } output??
19 Answers EBS, Ramco, Sangwin, TCS,
what is the main use of c where it can use the c