We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Concern past papers too

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 777

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

Subject:CS201 Introduction to programming 

Date:28-05-2013

total mcqs of 1MArks each: 20

Total short Subjective  Questions of 3Marks:2Total short subjective Questions

Q) Write the syntax for calling function string manipulation function which compare the first 5 character array "name" with string "asdf"?

Q))When a pointer isincremented then how many bytes will it move to change its address?

Q)Declare an integer array longroutes and pointer routrptr and assign the address of array longroutes to the pointer variable routeptr to the pointer?

Q)Find which is legal and illegal ?

Q) show the output of the following code:

main()

{char st[]="~This is -a sample string!";

char*pch;

pch=strtoklstr,",-s`";

while(pch!=Null)

coutPch;

pch=strtok(NULL,",-s~")

}

return 0;

}

whats the output of last question if any one knows then share please.

thiasampletring

 Shafaq Shafique thanks for sharing ur paper 

Attention Related Mid Term papers Spring 2013: All Fellows You don’t need to go any other site for current Mid Term papers Spring  2013, Because All discussed data/sharing of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

 

CS201 Introduction to Programming

Today Midterm Paper (27-5-2013)

 

Bc090200975

 

Total Questions :26

20 Marks: 20 MCQ’S

2 Marks: 2 questions

3Marks: 2 questions

5Marks: 2 questions

 

  1. There is a pointer “ptr”of type int then address of which type of variable the ptr will store in it?

Variable of type char

Variable of type int

Variable of type double

Variable of type short

 

  1. Overflow condition occur when we try to assign a value to a variable which is _______

Less than its max size

Greater than its max size

Equal to

With in its range

 

  1. Which one of following statement is equal to x%=5?

x=%x5                         x=x%5             x=%5               x%=x5

 

  1. < , <=, >, >= are called ________ operators.

Logical Arithmetic                     Relational                     Conditional

 

  1. Correct way to initialize a character array ‘course’ with string “programming” is:

Course[12]=”programming”;

Course[]={”programming”};

 Course[]=’programming’;

 Course=”programming”;

 

  1. In c/c++ null cahracter is represented as:

\n                     \0                     \t                      \r

 

  1. To access the address of the variable ________ operator is used.

*

->

&&

&

 

  1. Afunction is a block of statements(codes) that can be ________

Defined repeatedly

Used limit no. of times

Defined once and used(call) as many times as required

Used only once

 

  1. In a return type of a function is void then it means that it will_______

Return any type of data

Return no data

Return some specific type of data                                              Return just char data

 

 

  1. C language was evolved from ________ language.

BASIC

FORTRAN

C++

B and BCPL

 

  1. The information stored in computer memory is ________

Volatile

Non-volatile

Redundant

Permanent

 

  1. A record is group of related ____________

Data

File

Bytes

Fields

 

  1. When accessing a structure member, the identifier to the left of the dot operator is the name of _________

A structure member

A tag

A variable

A keyword structure

 

  1. Stuctures are __________ allocation.

Heap

Queue

Stack

Cache

 

  1. An object of __________ class be created for saving the current possition of any opened file before reading from the file.

Filepos

Streampos

Stream

File stream

 

SUBJECTIVE PART:

 

How the two dimensional array is related to the matrix .2 MARKS

Assuming that “num” is a 2D array of character than what does statement *num contains? 2MARKS

 

 

Write a program in which you prompt the user to take 10 values in array and then display them ,sort the array and then find the maximum and minimum number in them . 3 MARKS

 

 

 

 

Write the output of the following: 5 MARKS

 

#include <iostream. h>

Union mytypes_t

{

            char c;

            int i;

            Float f;

}

mytypes;

 

int main();

{

 

            mytypes.c=’H’;

            mytypes.i=’15’;

 

coutsize of (mytypes)endl;

 

            mytypes.i=’15’;

            mytypes.c=’H’;

 

coutsize of (mytypes)endl;

 

return0;

 

}

 

 

Explain the logic of each statement:  5 MARKS

     Streampos orig=aFile,tellp();

     aFile.seekp(0.ios::end);

 

 

 

 

 

In Mcqs ka koi Correct Option bata sakta he plz ???? 

  1. Which one of following statement is equal to x%=5?

x=%x5                         x=x%5             x=%5               x%=x5

  1. Correct way to initialize a character array ‘course’ with string “programming” is:

Course[12]=”programming”;

Course[]={”programming”};

 Course[]=’programming’;

 Course=”programming”;

  1. Afunction is a block of statements(codes) that can be ________

Defined repeatedly

Used limit no. of times

Defined once and used(call) as many times as required

Used only once

 

  1. In a return type of a function is void then it means that it will_______

Return any type of data

Return no data

Return some specific type of data                                             

Return just char data

 

 

  1. C language was evolved from ________ language.

BASIC

FORTRAN

C++

B and BCPL

 

  1. The information stored in computer memory is ________

Volatile

Non-volatile

Redundant

Permanent

 

  1. A record is group of related ____________

Data

File

Bytes

Fields

 

  1. When accessing a structure member, the identifier to the left of the dot operator is the name of _________

A structure member

A tag

A variable

A keyword structure

 

  1. Stuctures are __________ allocation.

Heap

Queue

Stack

Cache

 

  1. An object of __________ class be created for saving the current possition of any opened file before reading from the file.

Filepos

Streampos

Stream

File stream

Write a programme which open the file named “this.txt”and using write ( ) function writes the string “introduction to programming” at the end of the file.At the end close the programme properly . 5

 Write down the output of the following code segment .

 Intnum[10]=[2,3,5,8,9,10,12,15,19,20]
 Int*ptr=num;
 For int i=o; i<10, i+=2
 {
 Cout(ptr+i)<,”;
 } 5

 When a pointer is incremented,what happens in the following cases?
 a)single-dimensional array
 b)two –dimensional array 3
 write down syntax in two different ways to intilize charcter array with strings”programming” 2

 what happen if the file “myfile.*does not exists and we still try to open it using the function file open (“myfile.txt”ios:out)? 2

1.Write a structure named inventory which has char array,int name and int Num..........3 Marks.
2.Syntax to close a file which has handle myfile.                                                ..........2 Marks
3.code consisting of calling a array by a function and how function call change array contents.     5 Marks.
4. const pointer related question.    ..........2 Mraks

Main Points of MCQs
-----------------------
1. referencing and dereferencing
2. c++ developed from B and etc.
3. what is structure.
4. range of int data type.

Write a programme which open the file named “this.txt”and using write ( ) function writes the string “introduction to programming” at the end of the file.At the end close the programme properly .               5

 

Write down the output of the following code segment .

 

            Intnum[10]=[2,3,5,8,9,10,12,15,19,20]

            Int*ptr=num;

For int i=o; i<10, i+=2

{

Cout(ptr+i)<,”;

}                                                                      5

 

When a pointer is incremented,what happens in the following cases?

a)single-dimensional array

b)two –dimensional array                                           3

    write down syntax in two different ways to intilize charcter array with strings”programming”               2

 

what happen  if the file “myfile.*does not exists and we still try to open it using the function file open (“myfile.txt”ios:out)?            2

 

CS201 Todays Paper

Q1: can we create an array of object for a class having defualt constrctor?
Q2: overloaded member function using ostream and istream show any example?
Q3: write c++ code to overload subscript [] operator for string class?
Q4: what does you meant by static data memberin c++:
Q5: explain the terms predecrenent and postdecrement ?

20 MCQs

6 questions

MCQs were easy and mostly from past papers

questions:

1. concept of CONST

2. Error removing from the code related to pointer

3. output of one code related to While and for loop

4. write a program by using character manipulation functions to separate numbers and alphabets from a given string.

5. In what sense does the close() function is used for memory efficiency

One I forgot

Best of Luck.............  

Sabika thanks for sharing ur paper 

Attention Related Mid Term papers Spring 2013: All Fellows You don’t need to go any other site for current Mid Term papers Spring  2013, Because All discussed data/sharing of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

RSS

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.