my frnds cs201 paper...
Q#1: Write down the output of the following code segment (2 marks)
Int x [10]={0,1,2,3,4,5,6,7,8,9};
lnt‘xptr;
Xptr=&x[5];
Cout<<*(ptr ++)+ 1;
Q#2: In ac language program, how does closing a file explicitly by using close() function provide advantages in terms of memory utilization? (2 marks)
Q#3: When a pointer is incremented what happens in the following case? (3 marks)
1. Single-Dimensional array
2. Two-dimensional array
Q#4: Which one of the given two methods a file and why? (3 marks)
Q#5: What will be output of the following segment? (5 marks)
lnt x=6; A
Int y;
X=x<<1;
Y=x>>1;
Cout<<“x=“<<x<<" In“;
Cout<<"y=“<<y;
Q#1: Write down the output of the following code segment (2 marks)
Int x [10]={0,1,2,3,4,5,6,7,8,9};
lnt‘xptr;
Xptr=&x[5];
Cout<<*(ptr ++)+ 1;
Q#2: In ac language program, how does closing a file explicitly by using close() function provide advantages in terms of memory utilization? (2 marks)
Q#3: When a pointer is incremented what happens in the following case? (3 marks)
1. Single-Dimensional array
2. Two-dimensional array
Q#4: Which one of the given two methods a file and why? (3 marks)
Q#5: What will be output of the following segment? (5 marks)
lnt x=6; A
Int y;
X=x<<1;
Y=x>>1;
Cout<<“x=“<<x<<" In“;
Cout<<"y=“<<y;