Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
16 views
Bankprogramming
Bank programming
Uploaded by
adelino
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Bankprogramming For Later
Download
Save
Save Bankprogramming For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
16 views
Bankprogramming
Bank programming
Uploaded by
adelino
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Bankprogramming For Later
Carousel Previous
Carousel Next
Save
Save Bankprogramming For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 20
Search
Fullscreen
1. Which of the following is the correct syntax of including a user defined header files in C++? a) finclude
b) #include
p ude “userdefined' 4) include [userdefined] 2. Which of the following is a correct identifier in C++? a) 7var_name b) 7VARNAME ToLVAR 1234 4) svar_name 3, Which of the following is used for comments in C+? a) // comment b) /* comment */ el both // comment or /* comment */ 4) // comment */ 4.Which of the following escape sequence represents tab? alt by \tir cob d)\a ‘Which of the following is called insertion/put to operator? alec b> a> d<6.Which of the following is called extraction/get from operator? ae o> ae 7.CHis 2) procedural programming language b) object oriented programming language €) functional programming language 1) both procedural and object oriented programming language 8. In which part of the for loop termination condition is checked? for(i) {iv} all by au av ‘9.What will be the output of the following C++ code? #include
using namespace std; int main()intx cout << ix << endl; } return 0; 1 a b)2 a3 4) 123 10.What will be the output of the following C++ code? include
int main() { cout<<"Hello World"; return 0; 3 a) Hellow World 2b) Compile-time error ) Run-time error 4) Segmentation fault ‘L1.Which type is best suited to represent the logical values? a) integer, b)boolean €) character d) float 12.The value 192.54 can be represented using which data type?a) double b) void Clint 4) boot 18.Given the variables p, q are of char type and r,s, t are of int type. Select the right statement? Lte(rts)/ (res); 2.t=(p*a)/(r+5); a) Lis true but 2is false b) 1is false and 2s true “cL both 1 and 2 are true 4) both 1 and 2 are false 14.What will be the output of the following C++ code? include
using namespace std; int main) int 1=1/-2; int k= 156-2: cout << 1 << k; return 0; } a) compile time error cb)-11 gia4) implementation defined 15.What will be the output of the following C++ code? include
using namespace std; int main) i inta; +375 cout << a; return 0; 1 a3 b)20 025 4) 30 16.What will be the output of the following C++ code? include
using namespace std; int main () ( int, y yo Hx te cout << x<< y; x25;Yee he: cout << x<< y; return 0; b) 736749 367497 4) 367597 17, What will be the output of the following C++ code? include
using namespace std; main() { double a= 21.09399; float b = 10.20; inte,d: cout << c< using namespace std int main () { int for (n=5;n>0; n-) { cout << n; if(n==3) break; ) return 0; b)54 ) 5432 ¢)53 19.What will be the output of the following C++ code? include
using namespace std int main) ( int 15; for (; cout
using namespace std; int main) { inti: for (i= { cout << ] return 0; } a) 0123456789 b)10 012345678910 10; i++); 4) compile time error 21.Which looping process is best used when the number of iterations is known? tal for b) while ) do-while ¢) all looping processes require that the iterations be known22.What's wrong? for {int k= 2, k<=12, k++) a) the increment should always be ++ b) the variable must always be the letter i when using a for loop €) there should be a semicolon at the end of the statement. 1d) the commas should be semicolons 23.Which looping process checks the test condition at the end of the loop? a) for b) while ‘1 do-while 4) no looping process checks the test condition at the end 24.The statement i++; is equivalent to abiziti; din 25. We can insert pre written code in a C++ program by using. a) fread b) # get ‘cl tinelude ¢) #put 26.What is a correct syntax to output "Hello World” in C+? a) System.out.printin( "Hello World”); b) ‘.cout << "Hello World “Hello World"4d) cin >> "Hello World"; 27.Which escape character can be used to begin a new line in C+? al\a b)\M Xb “d)\n 28.Which data type is used to create a variable that should store text? a) String, *°b) string ©) mystring d) tet 29.Which of the following languages is a subset of C++ language? a) C language b) Java Language ) CH language 1d) none of the above 30.How do you create a variable with the numeric value 5? a) double x= *b) int ©) float x= 5; d) x5: 31.Which of the following shows the correct syntax for an if statement? expression b) if {expressionLif (expression 4) expression if 32.Which is valid C++ expression? ad int first_num = 55: b) int tnum = 55; )int first num = 55; 4d) int first_num = 55; 33.Which header file lets us work wit input and output objects? a) flinclude < iosstring> tb) include
) include
4) #include
34.Which operator is used to multiply numbers? ax by o& d)% :35.What symbol is used to state the beginning and the end of blocks of code ? a) (and) b)
Land] *d) fand 36. f you forget to put a semicolon at the end of a line of C++ code, you may have committed whichtype of error? a) logic b) runtime el syntax d) warning €) execution 37.C+* statement to increase the value of variable N by 10: a int +10, b)intN=N "40; C)intN = 10; 4) int N= N-10; 38.1F A and B are boolean variables, then the expression (! || (18) is equivalent to which of the following conditions: a) (VA 118) “DL (A 6&6 B)) ©) (A) 8& (18) 4) (1A) [1 (18) 39.What will be the output of following case: cout << 3 * 445 << endl; a)27 be “047 12 40.How many times does the following loop execute: for (i= a) 100 times b) 99 times1101 times ) 90 times 41.The following C++ code segment = x) is equivalent to: abit byit ly <=») ify) a) if (<= y) 42.What is the output of the following program segment? intx .¥=0% if (> 088 y<0){ x=y= 23; 43.What using statement do you always put at the top of your programs (to get standard naming conventions)? a) using name std; blusing namespace std: c) using std; 4) using namespace; 44.Which of following called logical OR operator:a) && 45.C++ statement that prints true if x and y have the same sign (-/+): a) if (:>=0 && yo=0) coute<"true"; D) if (x<=0 8& y<=0) cout<<"true"; aio || y>=0) coute<"true’ cA) if*y>0) couts<"true"; 46.1n switch case, what keyword covers unhandled possibilities? a) contingency *b) default other d) all 47.Which is NOT a loop structure? a) for b) while ‘] repeat until 4) do-while 48.Evaluate #(1 && 1(0 || 1)) 7a) Trueb) False ©) Unevaluatable ) Null 49.What is the output of the following program segment? oO: dol cout << i << "\n") i) while (i< 3); a)0123 byt 2 3 q12 ‘a0 '50.What punctuation ends most lines of C++ code? a). b, a)" 51LWhich of the following is the correct operator to compare two variables? ali b=4d) equal '52.What is the output of the following program segment? int day switch (day) ( case 6: cout << "Today is Saturday"; break; case 7: cout << "Today is Sunday"; break; default: cout << "Looking forward to the Weekend” } a) Saturday b) Sunday ) Today is Saturday d) Today is Sunday ‘e) Looking forward to the Weekend £) No output '53.Which of the following is NOT a correct variable type? a) float
Olly
>)" '56.Header file
Itis used to: al define the cout, and cin objects, which correspond to standard output stream, and standard input stream b) declare services useful for performing formatted 1/0, such as setprecisi setw ) declare services for user-controlled file processing 4) None of above 57.Whal the output of the following program segment? int myNum = 10; int yourNum = 30; if (yourNum % myNum == 3){ yourNum = 3; ‘myNum_ else if (yourNum % myNum yourNum = 2; smyNum = 25}else { yourNum = 4; myNum = 3; } cout <« myNum << " sala b) 30 << yourNum << endl; } a3 au '58.When C++ if-else statement tests the condition, it executes if: a) condition is true b) condition is false ‘block if condition is true otherwise else block is executed 4) block if condition is false otherwise else block is executed 59.C#+ statement that prints true if xis an odd number and positive: a) if (2 !=0 || x>0) coute<"true"; “b)if x % 2 10 &&x> 0) cout<<"true"; ifs 68 x< 0} cout<<"true"; 4d) if ¢%2==0 || x>0) couts<"true"s the output of the following program segment? couts< "The first three multiples of 3 are:"<
You might also like
Uoit Calculus 2 Midterm
PDF
No ratings yet
Uoit Calculus 2 Midterm
26 pages
أسئلة سي زائد زائد 1
PDF
No ratings yet
أسئلة سي زائد زائد 1
48 pages
Loki Oop
PDF
No ratings yet
Loki Oop
4,280 pages
Final Exam 2023 Code I-1
PDF
No ratings yet
Final Exam 2023 Code I-1
8 pages
Pretest (Finals)
PDF
No ratings yet
Pretest (Finals)
18 pages
Model Exam - Introduction To Computing
PDF
No ratings yet
Model Exam - Introduction To Computing
12 pages
Structured Programming Exam Full
PDF
No ratings yet
Structured Programming Exam Full
4 pages
Quiz 1 C++
PDF
No ratings yet
Quiz 1 C++
8 pages
C++ Questions
PDF
No ratings yet
C++ Questions
7 pages
MCQ 2022
PDF
No ratings yet
MCQ 2022
16 pages
Smu Bca Object Oriented Programming Using C++ (Bc0037) Sem 2 Question Papers 2
PDF
No ratings yet
Smu Bca Object Oriented Programming Using C++ (Bc0037) Sem 2 Question Papers 2
14 pages
Pre Test6 Benzal MJ
PDF
No ratings yet
Pre Test6 Benzal MJ
7 pages
CSCI 1470 Quiz1 Key
PDF
No ratings yet
CSCI 1470 Quiz1 Key
9 pages
c++final revision fall 2024
PDF
No ratings yet
c++final revision fall 2024
8 pages
Who Invented C++
PDF
No ratings yet
Who Invented C++
11 pages
C++_Q[1]
PDF
No ratings yet
C++_Q[1]
9 pages
I. Multiple Choices. Write The Letter of Your Choice For Each of The Items On The Answer Sheet
PDF
No ratings yet
I. Multiple Choices. Write The Letter of Your Choice For Each of The Items On The Answer Sheet
8 pages
Exit Exam CPP - 2
PDF
No ratings yet
Exit Exam CPP - 2
23 pages
xii C++ (2,3,4 upto call by reference) 07.08.2017
PDF
No ratings yet
xii C++ (2,3,4 upto call by reference) 07.08.2017
8 pages
ch2
PDF
No ratings yet
ch2
11 pages
Introduction to Programming
PDF
No ratings yet
Introduction to Programming
38 pages
OBJECT Oriented Programming Using C++: (1-MARK Questions)
PDF
No ratings yet
OBJECT Oriented Programming Using C++: (1-MARK Questions)
14 pages
c++++++++.docx.86feb0f717e192e5a7ccdea52957ce35.bak-1
PDF
No ratings yet
c++++++++.docx.86feb0f717e192e5a7ccdea52957ce35.bak-1
21 pages
Sample Paper 7
PDF
No ratings yet
Sample Paper 7
6 pages
Long Quiz 01 19 23
PDF
No ratings yet
Long Quiz 01 19 23
4 pages
Bca2001 Set A
PDF
No ratings yet
Bca2001 Set A
16 pages
C++Q
PDF
No ratings yet
C++Q
17 pages
1stexam Sol
PDF
No ratings yet
1stexam Sol
6 pages
Dcs 106 Resit
PDF
100% (1)
Dcs 106 Resit
6 pages
Questions
PDF
No ratings yet
Questions
9 pages
Programming Fundamentals Exit Exam (2)
PDF
No ratings yet
Programming Fundamentals Exit Exam (2)
11 pages
CS Test Bank-3
PDF
No ratings yet
CS Test Bank-3
7 pages
MCQS C++
PDF
No ratings yet
MCQS C++
57 pages
Question - Quiz New Year
PDF
No ratings yet
Question - Quiz New Year
5 pages
502 Aptitude Test For MSC Computer Science
PDF
No ratings yet
502 Aptitude Test For MSC Computer Science
37 pages
CPP Q Bank My Answers
PDF
No ratings yet
CPP Q Bank My Answers
8 pages
cs201 Mcqs by Izhar
PDF
No ratings yet
cs201 Mcqs by Izhar
48 pages
STQS1313 2017 2018pdf 230205 133219
PDF
No ratings yet
STQS1313 2017 2018pdf 230205 133219
15 pages
C++ MCQ - qb
PDF
No ratings yet
C++ MCQ - qb
31 pages
Model Exam 2015
PDF
No ratings yet
Model Exam 2015
8 pages
BC0037 OBJECT Oriented Programming Using C++ PAPER 2
PDF
No ratings yet
BC0037 OBJECT Oriented Programming Using C++ PAPER 2
14 pages
C, C++
PDF
No ratings yet
C, C++
15 pages
2 C++
PDF
No ratings yet
2 C++
10 pages
I.Choose The Correct Answer: 35 X 1 35: Optim Test - 3
PDF
No ratings yet
I.Choose The Correct Answer: 35 X 1 35: Optim Test - 3
3 pages
Chapter End Quiz
PDF
No ratings yet
Chapter End Quiz
44 pages
CS -I
PDF
No ratings yet
CS -I
5 pages
Introduction to Programming CS 201 S olved
PDF
No ratings yet
Introduction to Programming CS 201 S olved
19 pages
Introduction To Computing Exit Exam Model Questions
PDF
No ratings yet
Introduction To Computing Exit Exam Model Questions
28 pages
C++ Q&A
PDF
No ratings yet
C++ Q&A
4 pages
Study-Guide-for-Creative-Tech
PDF
No ratings yet
Study-Guide-for-Creative-Tech
3 pages
1689859607C++ Programming
PDF
No ratings yet
1689859607C++ Programming
9 pages
Structured_Programming_Exam_New
PDF
No ratings yet
Structured_Programming_Exam_New
4 pages
Quiz 5
PDF
No ratings yet
Quiz 5
6 pages
Fundamental of Programming II
PDF
67% (3)
Fundamental of Programming II
9 pages
Chap 6-Graph
PDF
No ratings yet
Chap 6-Graph
70 pages
Chapt 5 Tree II
PDF
No ratings yet
Chapt 5 Tree II
24 pages
Chapt 5 Tree I
PDF
No ratings yet
Chapt 5 Tree I
24 pages
Chapt 4 - II
PDF
No ratings yet
Chapt 4 - II
42 pages
Chap 1
PDF
No ratings yet
Chap 1
45 pages