Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What is the output of the following program? void main(){ int a; printf(%u201

ID: 3537474 • Letter: 1

Question

1. What is the output of the following program?


void main(){

int a;

printf(%u201C%d%u201D,a++);

}

a.error b.garbage value c.0 d.1


2 . what is the output for the following program?

void main(){

float f;

printf("%d",f);

}

a.garbage value b.0 c.0.0 d.none of this


3. which one of the following is not a proper variable definition?

void main(){

line1 //float f12___;

line2//int ___;

line3//char %u2018a%u2019;

}

a.line1 b.line2 c.line3 d.none of this


4. what is the output for the following program?

void main(){

float f12___;

int ;

char %u2018a%u2019;

}

a.garbage value b.error c.compiles the program d.none of this


6. a variable can have?

a. any special symbol b.keywords c.can start with digit d.none of this


6.find the error

void main(){

Line1//Int main=18;

Line2//Int main2=0;

Line3//printf(%u201C%d%d%u201D,main,main2);

a.at line1 & line 2 b.at line3 c.at line2 d.none of this


7.which of the following is not a primitive data type?


a.int b.char c.float d.array


8.charecter set of c can contain?

a.alphabets b.digits c.specila symbols d.all


9.what is the output of following?

Void main(){

Char a=a;

Printf(%u201C%c%u201D,a);

a.a b.error c.garbage value d.none of this


10.what is the output of following?

Void main(){

Int a=%u2019a%u2019;

Char b=b;

Printf(%u201C%d%d%u201D,a,b);

a.ab b.error c.garbage value d.none of these

Explanation / Answer

1)d 2)b 3)a 4)d 5)c 6)b 7)a 8)a 9)c 10)d