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
write a proram to reverse the string using switch case?
Explain what math functions are available for integers? For floating point?
List the difference between a "copy constructor" and a "assignment operator"?
Explain what is the most efficient way to store flag values?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
What are the uses of null pointers?
What is a pointer in c?
What is character set?
What is c language in simple words?
explain what are pointers?
What is operator promotion?
In a switch statement, explain what will happen if a break statement is omitted?
What is d'n in c?
Explain what are the different data types in c?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.