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 |
Every time i run a c-code in editor, getting some runtime error and editor is disposing, even after reinstalling the software what may be the problem?
Please write me a program to print the first 50 prime numbers (NOT between the range 1 -50)
progrem to generate the following series 1 12 123 1234 12345
What is return in c programming?
write a program to find the largest and second largest integer from an array
1.Why do you call C is middle level language? 2.Why do you call C is userfriendly language.
What is the difference between declaring a variable and defining a variable?
Is c pass by value or reference?
write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer
What is merge sort in c?
What is a sequential access file?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?