VUsolutions on Facebook

This website is now MOVED to new domain, i.e. www.VUsolutions.com.


SO, now to onward, for any kind of data & help you may visit www.VUsolutions.com

NOTE: This blog having all past papers from midterm & final term exams, and uploaded on the same day when the papers was held. For SOLVED PAPERS you may visit VUsolutions GURU website. We dedicated VUsolutions GURU website just for past SOLVED papers & SOLVED online quizzes.

VU Past solved papers

Wednesday, November 30, 2011

CS201 VU Midterm Current Papers Fall 2011 of Virtual university of paksitan (www.vusolutions.com)


 VU Midterm Current Papers Fall 2011 of Virtual university of paksitan (www.vusolutions.com)

Q1- Determine the value of m and n after the execution of code given below.

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. (5 MARKS)

Q2- Write a program which defines two strings "Hello" and "Pakistan", merges both the strings using string manipulation function and displays on the screen. (5)

Q3- How the function strcpy() is different from the function strncpy() in terms of their working?
Q4- Determine the output of the given code segment. 

#include <iostream.h> 
main()
{
char *name[] = {"Ali", "Ahmad", "Riaz"};
int x;
int y; 
x = sizeof(name);
y = sizeof(*name);
cout<<x<<endl<<y; 
return 0;
}

Q5- We know that random method for accessing the files increases the performance but there are certain constrainsts on it. Mention those constraints

Q6- Write the code to access the element at third row and second column of a 2D array uses pointer named arrayptr.
:::::::::::::::::::::::::::::::::::::::::::::For more posts, click "Older Posts"::::::::::::::::::::::::::::::::::::::::::