Input / Output

Q1:
What will be the output of the program ?
#include<stdio.h>

int main()
{
    int a=250;
    printf('%1d\n', a);
    return 0;
}

A 1250

B 2

C 50

D 250

ANS:A - 1250

int a=250; The variable a is declared as an integer type and initialized to value 250. printf('%1d\n', a); It prints the value of variable a. Hence the output of the program is 250.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.