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 / sri

output is 1 but this prg display 2 warning (ie) Nonportable
pointer comparsion

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why calloc is better than malloc?

582


Why does this code crash?

629


What is a lvalue

670


Explain b+ tree?

639


what are # pragma staments?

1636






Describe the order of precedence with regards to operators in C.

642


Explain union.

645


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

676


Explain how can a program be made to print the name of a source file where an error occurs?

698


What is a pointer and how it is initialized?

615


How would you obtain the current time and difference between two times?

738


What does c mean before a date?

604


What is the difference between int main and void main?

584


explain what is an endless loop?

619


Is c compiled or interpreted?

682