CS201 Latest Midterm Papers 2012


These all papers shared by users
CS201 Today Paper
Total Questions = 26
Total MCQ = 20 (Each of 1 Marks)
Total Short Questions = 2 (Each of 2 Marks)
Total Short Questions = 2 (Each of 3 Marks)
Total Long Questions = 2 (Each of 5 Marks)


Q write a code to open a file, file name is "myfile.txt"
Q write a structure whos name is Inventory etc 3marks
Q declare 2-dimentional array and then assign pointer to this array 2 marks
Q aik code diya tha us ka output batana tha ....strtok wala code tha for 5 marks
Q write a code which pass camand line argument to main and return integer 3 marks
Q if p and q are int pointer and n is integer then the followings are legal or illigal 5marks
1 p - q
2 p-n
3 q+n
4 q+ p
5 n +p 

-------------------------------------------------------------------------------------------

Cs 201 current paper :

20 mcqs and 2 3 question of 2 marks 2 question of 3 marks ,2 question of 5 marks 

Q.A two-dimensional array has 3 rows and 4 columns. Write down the syntax to initialize first element of all
three rows of two-dimensional array with value 2.

Q.Identify the errors in the following code segment and give the reason of errors
main(){
int x = 10
const int *ptr = &x ;
*ptr = 5 ;
}
Q. Write the syntax of outfile.text ?
Q Advantage of close() file

--------------------------------------------------------------------------------------------

1:-Detect the correct compile time error(s) in the following code
Hints:- The following code print number from 1-100 (5 Marks)
Void main()
{
int cout:
float *ptr;
for(couter=1;couter<=100;couter++)
{
ptr=couter:
coutptr” ”;
getch();
return 0;
}

2:- write a program which declare an array and initialize it with string ‘WELCOME TO VIRTUAL UNIVERSTY’. Then using string manipulate function, replace all the white space in the string with new line characters and also convert all the lower cases latter of string into upper case latter. In the end program displaces the following string on the screen
The program should display the string as
Welcome
To
Virtual
University
(5 Mars)

3:- In any program language structure and array are used for what purpose (3 marks)
4:- what is syntax for finalization of the pointer ptr of type with variable x? (2 marks)
and one more question related to a program and that was of 5 marks

------------------------------------------------------------------------------------

Paper of CS201 (Mid Term 08-Dec-2012)
Time 2:30 pm Total Marks = 40

Total Questions = 26
Objective Question = 20
Subjective Question= 6
Q 1 & 2 = 2+2 marks
Q 3 & 4 = 3+3 marks
Q 5 & 6 = 5+5 marks
___________________________
Today paper
20 % from past papers
&
80 % in Handouts + Video Lec
In Subjective area
1- what is meant by C++ Statement: const int *ptr = &x;? 2 marks
2- Pointer character stored the string in C++ and array character stored the string in C++? now discussed who is more efficient? 3 marks
3- Find the syntax error? 2 marks
4- Write a program related array topic? 5 Marks
5- Write a program related union? 5 Marks
6- I forgot this question
I hope so it will help u in ur preparation of CS201 papers . . .

------------------------------------------------------------------------------

CS201 MID TERM Current Papers Dec.-2012 Fall 
paper tough tha mcqs b ajeeb say thay
exact to yaad nahi but kuch aisay thay questions
Q write a code to open a file, file name is "myfile.txt"
Q write a structure whos name is Inventory etc 3marks
Q declare 2-dimentional array and then assign pointer to this array 2 marks
Q aik code diya tha us ka output batana tha ....strtok wala code tha for 5 marks
Q write a code which pass camand line argument to main and return integer 3 marks
Q if p and q are int pointer and n is integer then the followings are legal or illigal 5marks
1 p - q
2 p-n
3 q+n
4 q+ p
5 n +p ( in mein yad nahi * ya / b hai tha ya ni)

Today paper
20 % from past papers
&
80 % in Handouts + Video Lec
In Subjective area
1- what is meant by C++ Statement: const int *ptr = &x;? 2 marks
2- Pointer character stored the string in C++ and array character stored the string in C++? now discussed who is more efficient? 3 marks
3- Find the syntax error? 2 marks
4- Write a program related array topic? 5 Marks
5- Write a program related union? 5 Marks
6- I forgot this question

Cs 201 current paper :

20 mcqs and 2 3 question of 2 marks 2 question of 3 marks ,2 question of 5 marks

Q.A two-dimensional array has 3 rows and 4 columns. Write down the syntax to initialize first element of all
three rows of two-dimensional array with value 2.

Q.Identify the errors in the following code segment and give the reason of errors
main(){
int x = 10
const int *ptr = &x ;
*ptr = 5 ;
}
Q. Write the syntax of outfile.text ?
Q Advantage of close() file
-----------------------------------------------------------------------------------
 CS201 My Today Midterm Paper
Date 14-12-2012
MCQ’s
Tamam MCQ’s past papers mein sy thy
Baqi questions ye thay
1)
In programming we use structure and Arrays for what purpose?    Marks=3
2)
Which is better approach in term of memory space occupation and why?                                                                      Marks=3
i)                                                                                                                                           Char *arr[]={“programming”,”fundamental”,”cs201”};
ii)                                                                                                                                        Char arr[3][50]= {“programming”,”fundamental”,”cs201”};
3)                                                    Marks=5
Determine the value of m and n after execution the code
Int m=44;
Int*p=&m;
Int &r=m;
Int n=(*P)++;
Int *q=p-1;
++*q;
Assume that integers occupy 4 bytes and that m is stored in memory.
                                                                                                        
4)                                                    Marks=5
Briefly explain the logic of given code. Also determine the value of ‘counter’ variable if the code below is executed.
Main ()
{
Int num=5;
Int counter=0;
  While (num !=0)
       {
          If (num &01)
   Counter++;
num >>=1;
}
return  0;
}
 Is k ilawah 2,2 marks k 2 questions b thy jo mujy yaad nai is waqat

-------------------------------------------------------------------------------------------------
CS201 Today Paper
Total Questions = 26
Total MCQ = 20 (Each of 1 Marks)
Total Short Questions = 2 (Each of 2 Marks)
Total Short Questions = 2 (Each of 3 Marks)
Total Long Questions = 2 (Each of 5 Marks)


Q write a code to open a file, file name is "myfile.txt"
Q write a structure whos name is Inventory etc 3marks
Q declare 2-dimentional array and then assign pointer to this array 2 marks
Q aik code diya tha us ka output batana tha ....strtok wala code tha for 5 marks
Q write a code which pass camand line argument to main and return integer 3 marks
Q if p and q are int pointer and n is integer then the followings are legal or illigal 5marks
1 p - q
2 p-n
3 q+n
4 q+ p
5 n +p 
        

No comments:

Post a Comment