Posts

Showing posts from January 27, 2018

Computer Programming theory quiz 3

QUIZ NO. 03 Date:    08 /05/2017 Time: 20 Minutes Total Marks: 10 Obtained Marks: _______ Enrollment No: ___________ Student_Name: ____________________________________ 1.       What will be the output of following program                                                       [2 mark] #include<iostream> #include<cmath> #include<iomanip> using namespace std; void traceMe(double x , double y); int main() { double one , two ; cout<<”enter two numbers:”; cin>>one>>two; cout...

Computer Programming theory quiz 2

QUIZ NO. 02 Date:     /03/2017 Time: 20 Minutes Total Marks: 10 Obtained Marks: _______ Enrollment No: ___________ Student_Name: ____________________________________ 1.         Suppose that scores is an int variable. Consider the following c++ code:                     [1 mark] int score; cin>>score; switch(score % 7) { case 0: score =score/2-1; break; case 1 : case 3: score =3 * score + 1; break; case 2: ++score; break; case 4: break; case 5 : case 6: score =score % 3; break; default: score = score/2; } cout<<score; a)       What is the output if the input is 12?       _______0_________ b)  ...