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 |
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
Is the following code legal? struct a { int x; struct a b; }
What is abstract data structure in c?
What is the value of uninitialized variable in c?
array contains zeros and ones as elements.we need to bring zeros one side and one other side in single parse. ex:a[]={0,0,1,0,1,1,0,0} o/p={0,0,0,0,0,1,1,1}
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
How to establish connection with oracle database software from c language?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Hi Every one......... Please Any body give me the answer for my question. Is it possible to print the word "PRINT F", without using printf() statement in C-Language.
What are the salient features of c languages?
write a own function to compare two strings with out using stringcomparition function?
Do you know what is a programing language ?