www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# CS201 Mid Term Papers Fall 2019 (14~26 December 2019) & All Solved Past Papers, Solved MCQs & Helping Material

CS201 Mid Term Papers Fall 2019 (14~26 December 2019) & All Solved Past Papers, Solved MCQs & Helping Material

Share you’re MidTerm Term Papers (Questions/Pattern) & Past Papers as well here to help each other. Thanks

Following type of Document can comments in this discussion:

## CS201 MidTerm Solved MCQs and Subjective with References by Moaaz

Note:

For Important Helping Material related to subject CS201 (Solved MCQs, solved past Papers, Short Notes, E-Books, FAQ, Short Questions Answers & more). You must view all the Discussion in this subject group.

Views: 3831

### Replies to This Discussion

Cs201 midterm 2019 fall dec 26

èWhat happens if the file 'myfile.txt' does not exist and we still try to open it using the function file.open(“myfile.txt”, ios:out)?

Would the open() function create a new file and open it OR it will generate an error?

èDetermine the output of the given code segment.

int x = 2;

switch(x){

case 1:

x += 1 ;

break ;

case 2:

x += 2 ;

case 3:

x +=3 ;

break ;

case 4:

x += 4 ;

break ;

}

cout x ;

èTransform the following If-else statement into switch statement.

if (x == 5)

...

else if (x == 10 || x == 11)

...

else if (x == 8)

...

else if (x == 9)

...

else

...

èWrite a C++ program which calculates the Net price of a book and displays it on the screen. The Net price of book can be calculated by the following formula:

Net price = Retail Price + Sales Tax + Income Tax

Retail Price, Sale Tax and Income Tax are taken as input from the user.

èWrite a program which opens a file named "writeFile.txt" and moves the file pointer 100 characters forward starting from the beginning of the file and then writes the message "Reached at position 101" at the new position in the file.

1

2

3

4

5

## VIP Member Badge & Others

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

## Latest Activity

+₳₥₥₳Ɽ₳ ₴₳฿łⱤ+ liked иαвєєℓ αнмє∂'s discussion !!! Kahin sy tu aajaaa !!!
2 minutes ago
2 minutes ago
7 minutes ago
7 minutes ago
27 minutes ago
+ M.Tariq Malik's 9 discussions were featured
27 minutes ago
+ M.Tariq Malik added a discussion to the group CS202 Fundamentals of Front End Development

27 minutes ago