loading...

CS201 VU Midterm Papers Spring May 2012

20 mcqs.mostly from past papers & 15-22 lectures
21) which bit of number is used as a sign bit?
22) open() & close() function advantage of memory utilization..
23) int array[7] is an int array type.what will b the statement for the fourth element of this array?
24 & 25 )write the output of the given code. 5 marks each

Another Paper

Subject Questions…
Q1. Write a program which will input ten integers into a array then sort it and find maximum and minimum integer in array.
Hint: Finding maximum and minimum is quite easier in sorted array. (10 Marks)
Q2. open() & close() function memory utilization advantages. (3 marks)
Q3. write down a syntax in which we can find the size of structure in bytes. (3 Marks)
Q4. Difference between (*) and (&) in pointers. (mark 5)
Q5. int num is an array then assign its address to point myPtr. (Mark 5)
etc…. etc… etc… etc..
Note: pointers mein se zyada questions aaye hain. Ratte Mar lo… 🙂

Another Paper:

Total 26 questions (6 subjective rest mcqs)
DevCpp, calculator not allowed.
most of the previous papers questions were given
Long questions were on, to write down the output of the given programme.( in these loop structures were given)
Question on output of array elements. (very basic one) marks ranging from 2 to 3.
write down a programme on the function involving the swap of integer values without using any other variable (laast one of 6 marks)
mcq’s including switch statemnet, type of software, word processor is either a random accesing file or serial acces file, a lot of questioning about pointers and arrays, the question of past papers in which a variable x=7-then what will be the value of x after x %=2.
All in all the paper is easy.

Another Paper:

Write a declaration statement for an array of 10 elements of type float. Also initialize first four elements of array to 1.0, 2.0, 3.0 and 4.0.(2)
Which bitwise operator returns true if both bits are different and returns false if both bits are same?(2)
Suppose if we want to store values like 10, 45.3, 4, A, D, 6.4, and 50 by using array. Can we store all these  elements by declaring a single array? Yes or no ? Give reason to support your answer(3)
Write the code for a structure called Inventory having the following elements:
A character array named partName
An integer named partNumber
An integer named stock. (3)
5.Write a program which opens a file named “this.txt” and then using write() function, writes the string “Introduction to Programming” at the end of the file.(5)
6.Write a program which declares and initializes an integer array of 10 elements and then using a pointer, displays the array elements in reverse order.

Another Paper:

Don’t remember the exact questions but giving the main theme.
There are
20 MCQ
2×2 Q
3×3 Q
5×5 Q

MCQ most programming base, like what is the syntax or output etc.

Q: tell the sizeof() value of a structure variable.
Q: use of the keyword “const”
Q: which of these functions are string manipulation and conversion function?
Q: a program which input a telephone number with city code and recognize if it is from lhr or not.
Q: an program is given and we have to tell the output. Program consists array and loop.
Q: how many memory locations will a pointer will jump if it is incremented.

DOWNLOAD SOLUTION HERE
loading...