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 |
find second largest element in array w/o using sorting techniques? use onle one for loop.
15 Answers BitWise, Zycus Infotech,
Discuss similarities and differences of Multiprogramming OS and multiprocessing OS?
write a prgram of swapping with 2 valiables
What does the characters “r” and “w” mean when writing programs that will make use of files?
Write a program in C to print the alphabets in order as on a mobile phone.i.e:When 2 is pressed once 'a' prints and if it is pressed two times 'b' prints and so on.we have to print all the alphabets as on mobile phone like this.
Explain what will the preprocessor do for a program?
main() { int i=5; printf("%d%d%d%d",i++,i--,i); }
Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc
can we execute the program with the object file
In C language, a variable name cannot contain?
Is c high or low level?
what is the use of call back function in c?tell me with example