Answer As You Can: Ques On 1
Answer As You Can: Ques On 1
Ques on 1
1- Assuming var1 starts with the value 50, what will the following code
fragment print out? cout << var1--; cout << var1; cout << ++var1; (6)
2- What is the difference between while…… do and do…… while by
using flowchart? (6)
3- Find the output for this subprogram
Int N[5]; Int *p;
p=N; *p=10; p++; *p=20;
p=&N[2]; *p=30; p=N+3;
*p=40; p=N; *(p+4)=50;
For(int i=0;i<5;n++) cout<<N[i]<< “,”; (12)
4- Write a while loop and do loop that displays the numbers from 110
to 100. (10)
Ques on 2