CS201 Midterm Current Paper Today

Q1.write the output of the following code?

int x=?

switch(x)

{

case 1:

x+=1;

case 2:

x+=2;

case 3:

x+=3;

cout<<x;

}

Q2.write the output of the following code?

int *ptr;

int num={21 , 45 , 45 , 32 ,64 , 55}

*ptr = &num:

cout<<*((ptr+1)*2);

}

Q3. Handouts page 76 program likhna tha

 

Also Read:  CHE301 Final Term Past Paper 2022

Leave a Comment