what is the output of below pgm?
void main()
{
int i=0;
if(i)
printf("pass");
else
printf("fail");
}
Answers were Sorted based on User's Feedback
Answer / himanshu goel
fail
because here if is taking 0 boolean value means condition
becomes false and else will be executed
Is This Answer Correct ? | 12 Yes | 0 No |
Answer / srikanth patchava
fail
if check value is thear or not ..if its thear it will got
frist printf other wise it will goto second printf
Is This Answer Correct ? | 0 Yes | 0 No |
what is difference between C and C++
Is it valid to address one element beyond the end of an array?
write the output of following code .. main() { static int a[]={10,20,30,40,50}; int *ptr=a; static int arr[2][2]={1,2,3,4}; char str[]="ABCD * 4#"; char *s=str+2; int i,j; for(i=0;i<5,i++) printf("%d",*ptr++); for(i=0;i<2;i++) for(j=0;j<2;j++) printf("%d\n",*(*(n+i)+j)); printf("%c\n%c\n%c\n",*(str+2),*s++,*--s); }
what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,z; z=x-- -y; printf("\n%d %d %d",x,y,z); }
how to find the largest element of array without using relational operater?
write a program to display reverse of a number using for loop?
How does memset() work in C?
what is a stack
what is the role you expect in software industry?
Why is c called a structured programming language?
List the difference between a "copy constructor" and a "assignment operator"?
Expand the following LKB BKL FFG