06-03-2010, 08:57 AM
CS 201 Introductiontoprogramming
16 MCQS most from past pappers.
2 or three short question from past pappers
Q1 which variable will be used in Inner code block if we have the same names of varables at outer code block. 2marks
Q2 write a declearation statement of the array of 10 elements of type float include an initialization of the first four elements to 1.0,2.0,3.0,4.0. 2 marks
Q3 which . Functions used to read/write more than a single character or a single line while using Files? 2marks.
Q4 What is differnet B/W tellf() and tellp() functions. 3mrks
Q5 what is different B/W variable andpointer 3 marks
Q6 write a C/C++ programm which define array of 10 elements and take a number as input if this number is in the array show its position if not thenshow a messeg that number is not in the array. 5 marks.
Q7 what will be the output of following programme?
Intx = 6 ;
Int y;
X = x<<1;
Cout<<x=”<<x<<\n;
Cout<<”y=”<<y;
16 MCQS most from past pappers.
2 or three short question from past pappers
Q1 which variable will be used in Inner code block if we have the same names of varables at outer code block. 2marks
Q2 write a declearation statement of the array of 10 elements of type float include an initialization of the first four elements to 1.0,2.0,3.0,4.0. 2 marks
Q3 which . Functions used to read/write more than a single character or a single line while using Files? 2marks.
Q4 What is differnet B/W tellf() and tellp() functions. 3mrks
Q5 what is different B/W variable andpointer 3 marks
Q6 write a C/C++ programm which define array of 10 elements and take a number as input if this number is in the array show its position if not thenshow a messeg that number is not in the array. 5 marks.
Q7 what will be the output of following programme?
Intx = 6 ;
Int y;
X = x<<1;
Cout<<x=”<<x<<\n;
Cout<<”y=”<<y;