Input / Output - Programming

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.