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 |
a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6
write a program in c language to print your bio-data on the screen by using functions.
6 Answers College School Exams Tests, IBM,
program that accepts amount in figures and print that in words
2 Answers Infosys, Lovely Professional University, Wipro,
can we access one file to one directory?
Can U write a C-program to print the size of a data type without using the sizeof() operator? Explain how it works inside ?
What are different storage class specifiers in c?
Where are some collections of useful code fragments and examples?
What are the properties of union in c?
how to find the size of the data type like int,float without using the sizeof operator?
write a c program in such a way that if we enter the today date the output should be next day's date.
Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile?
Why c is a procedural language?