Sail E0 Webinar
Question


What will be the output of the program ?


#include<stdio.h>
int main()
{
int a=250;
printf("%1d\n", a);
return 0;
}
Options:
A .  1250
B .  2
C .  50
D .  250
Answer: Option D

int a=250; The variable a is declared as an integer type and initialized to value 250.

printf("%1d`setminus`n", a); It prints the value of variable a.

Hence the output of the program is 250.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers