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
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
how many key words availabel in c a) 28 b) 31 c) 32
What are types of functions?
Why do we use namespace feature?
Is it better to bitshift a value than to multiply by 2?
What is an endless loop?
How do you write a program which produces its own source code as output?
What is the right way to use errno?
Why is sprintf unsafe?
What is the meaning of && in c?
What is a nested formula?
What is a good way to implement complex numbers in c?
How many types of operator or there in c?
What are the differences between new and malloc in C?
What is a ternary operator in c?