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
What are the types of type specifiers?
What are the valid places to have keyword “break”?
#include
Explain 'bus error'?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is #line used for?
What are enumerated types?
Explain what are reserved words?
Which are low level languages?
What is time complexity c?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
Explain what is a pragma?
Which type of language is c?
Does c have enums?
Explain indirection?