#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


Please Help Members By Posting Answers For Below Questions

What is the significance of c program algorithms?

674


When should you not use a type cast?

651


What is pointer to pointer in c language?

585


What is a stream?

639


What is array in c with example?

607






Can a pointer point to null?

578


What is a buffer in c?

566


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

569


Explain how can a program be made to print the name of a source file where an error occurs?

677


What is the difference between local variable and global variable in c?

677


What are the benefits of organizational structure?

564


Is it cc or c in a letter?

553


Is there any demerits of using pointer?

619


What are qualifiers and modifiers c?

537


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1107