what is the output of below pgm?
void main()
{
int i=0;
if(i)
printf("pass");
else
printf("fail");
}
Answer Posted / 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 |
Post New Answer View All Answers
How can a process change an environment variable in its caller?
What is #pragma statements?
What is meant by high-order and low-order bytes?
What does return 1 means in c?
What is a function in c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
Can you write the function prototype, definition and mention the other requirements.
What is wrong with this initialization?
Why do we use int main?
What is meant by 'bit masking'?
What is spark map function?
Is c object oriented?
What is malloc and calloc?
Explain what is the difference between functions abs() and fabs()?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }