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 are c identifiers?
What is an example of structure?
What is uint8 in c?
What is malloc calloc and realloc in c?
What is spark map function?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
What does #pragma once mean?
When can a far pointer be used?
Is anything faster than c?
Explain setjmp()?
What are header files and what are its uses in C programming?
Write a program to swap two numbers without using the third variable?
what are the advantages of a macro over a function?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
Why c is a mother language?