php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS201 Midterm Paper May 2010
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#2
MIDTERM EXAMINATION
Spring 2010
CS201- Introduction to Programming

Question No: 1 ( Marks: 1 ) - Please choose one


C language is developed by

► Bill Gates

► Robert Lafore

► Dennis Ritchie

► Deitel & Deitel



Question No: 2 ( Marks: 1 ) - Please choose one


Which of the following choice is not an example of an int datatype?

► 0

► -32

► 65531

► -4.0



Question No: 3 ( Marks: 1 ) - Please choose one


In flow chart, the symbol used for decision making is,

► Rectangle

► Circle

► Arrow

► Diamond



Question No: 4 ( Marks: 1 ) - Please choose one


Switch statement deals with,

► Integer data only

► float data only

► character data only

► Integer and character data



Question No: 5 ( Marks: 1 ) - Please choose one


Default case in switch statement is,

► Must

► Optional

► syntax error

► Necessary



Question No: 6 ( Marks: 1 ) - Please choose one


*.doc is _____________ by type.
.


► Sequential File


► Random Access File


► Data File


► Record File





Question No: 7 ( Marks: 1 ) - Please choose one


Member function tellg() returns the current location of the _____________ pointer.

► tellptr()


► write()


► seekg()


► get()





Question No: 8 ( Marks: 1 ) - Please choose one


Dealing with structures and functions passing by reference is the most economical method


► True

► False



Question No: 9 ( Marks: 1 ) - Please choose one


In C/C++ all character strings are terminated with,

► Null character

► String

► Zero

► Full stop



Question No: 10 ( Marks: 1 ) - Please choose one


Word processor is


► Operating system

► Application software

► Device driver

► Utility software



Question No: 11 ( Marks: 1 ) - Please choose one


Which of the following can not be a variable name?

► area

► _area

► 10area

► area2



Question No: 12 ( Marks: 1 ) - Please choose one


Which looping process is best, when the number of iterations is known?

► for

► while

► do-while

► all looping processes require that the iterations be known



Question No: 13 ( Marks: 1 ) - Please choose one


By default an array of characters is passed by value to a function,


► True

► False



Question No: 14 ( Marks: 1 ) - Please choose one


Which of the following operator is used to access the address of a variable?



► * operator


► -> operator


► && operator

► & operator



Question No: 15 ( Marks: 1 ) - Please choose one


The name of an array represents address of first location of array element.


► True

► False



Question No: 16 ( Marks: 1 ) - Please choose one


Let suppose

Union intorDouble{
Int ival;
Double charvar;
};

main(){
intorDouble VAZ;
int size ;
size = sizeof(VAZ);
}

What will be the value of variable "size", if int occupies 4 bytes and double occupies 8 bytes?


► 2

► 4

► 8

► 12



Question No: 17 ( Marks: 2 )


What is the difference between for loop and while loop?



Question No: 18 ( Marks: 2 )


Consider the structure

struct Customer
{
int custnum;
int salary;
float commission;
};

A programmer wants to assign 2000 for the structure member salary in the above example of structure Customer with structure variable cust1 What line of code should he write



Question No: 19 ( Marks: 2 )


When a pointer is incremented then how many bytes will it move to change its address?



Question No: 20 ( Marks: 3 )


If there are 2n elements in an array then what would be the number of iterations required to search a number using binary search and linear search?



Question No: 21 ( Marks: 3 )


Perform left shift operation on a binary number 0101 and write the result in binary and decimal.



Question No: 22 ( Marks: 5 )


What will be the output of following code segment?
void func(int [], int);
main(){
int arr[5] = {2, 3, 5, 6, 7} ;
func(arr, 5) ;

for (int i = 0; i<5; i++)
cout << arr[i] << “ ”;
}
void func(int a[], int size){
for (int i = 0; i<size; i++)
a[i] = 2*a[i];
}



Question No: 23 ( Marks: 5 )


What is random access file and how data can be read and write into random access file?
Reply


Messages In This Thread
CS201 Midterm Paper May 2010 - by Guru - 05-29-2010, 02:32 AM
CS201 Midterm Paper May 2010 - by viki - 06-03-2010, 08:56 AM
CS201 Midterm Paper May 2010 - by viki - 06-03-2010, 08:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  CS101 Introduction To Computing Solved Quiz Spring 2010 Guru 2 6,104 12-15-2014, 08:37 PM
Last Post: Vuhelper
  CS201-Introduction to Programming Quiz No.3 Discussion and Solutions Fall 2014 vuassignments 0 1,758 07-04-2014, 02:15 AM
Last Post: vuassignments
  CS201-Introduction to Programming Quiz No.1 Solutions Spring 2014 vuassignments 0 2,673 05-15-2014, 04:17 PM
Last Post: vuassignments
  CS201 Introduction to Programming Online Quiz No.4 Solution & Discussion Fall 2013 Vuhelper 0 2,333 02-08-2013, 05:08 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Quiz No.1 Fall Semester 2012 Vuhelper 0 2,777 11-08-2012, 02:56 PM
Last Post: Vuhelper
  ECO401 Solved Current 500 MCQ's 14 July 2010 viki 5 5,440 05-04-2012, 11:48 PM
Last Post: Xpert
  CS504 Paper May 2010 viki 2 2,528 04-14-2012, 09:31 PM
Last Post: Xpert
  MGT-502 Organizational Behaviour Midterm 5-Papers Solved viki 4 8,414 04-02-2012, 01:35 AM
Last Post: Xpert
  MTH302 Business Mathematics & Statistics 22 november, fall 2010 share your quiz IQ-test 5 2,907 11-21-2011, 09:29 PM
Last Post: anjum1
  CS201 - Introduction to Programming quiz on 30th june spring 2011 Xpert 0 2,363 07-01-2011, 01:24 AM
Last Post: Xpert

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support