#include<stdio.h>
void main()
{
int a=5,b=6,c;
int x=(a<b)+7;
int y=(x==7)*9;
int z=(c=x+y)*2;
printf("%h %h %h",x,y,z);
}
What is the output? Explain it.
Answer Posted / arun sebastin
The answer is %h %h %h
Because to print integer in c we have to use %d
but here they use %h which is wrong and the printf
statement print it without any error
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
Is calloc better than malloc?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
Can include files be nested? How many levels deep can include files be nested?
How do you define a function?
What is c programming structure?
Dont ansi function prototypes render lint obsolete?
Explain how can I open a file so that other programs can update it at the same time?
What's a good way to check for "close enough" floating-point equality?
What is a pointer value and address in c?
What are the characteristics of arrays in c?
What is array in C
What are the scope of static variables?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
Explain how can a program be made to print the name of a source file where an error occurs?
How can you pass an array to a function by value?