Quiz
Programmaing Languages and Technologies
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (200)
11. Specify the types of operator
- ALogical, Bitwise, Arithmetic, Relational
- BMathematical, Bitwise, Arithmetic, Relational
- CAssignment, Bitwise, Arithmetic, Relational
- DLogical, Bitwise, Assignment, Relational
22. Logical operators always evaluated from
- ALeft to right
- BNo difference
- CNot sure
- DRight to left
33. When an equation uses more than one type of operator then the order of precedence has to be established with the different types of operators:
- AArithmetic, comparison, logical
- BComparison, logical, arithmetic
- CLogical, arithmetic, comparison
- DArithmetic, logical, comparison
44. Precedence for Logical Operators
- ANOT, AND, OR
- BOR, AND, NOT
- COR, NOT, AND
- DAND, OR, NOT
55. What is an array?
- AAn array is a series of elements of the different type placed in contiguous memory locations that can be individually referenced by adding an index to a unique.
- BAn array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by multiplying an index to a unique identifier
- CAn array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier
- DAn array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a same identifier.
66. When an array is partially initialized, the rest of its elements will automatically be set to zero
- AFalse
- BTrue
- CNothing
- DAll of them
77. The whole array can be passed to a function. However, it can't be changed by the code in that function
- AFalse
- BAll of them
- CNothing
- DTrue
88. What are the three steps in using a function?
- ADefinition, prototype, invocation
- BPrototype, argument, signature
- CDefinition, invocation, argument
99. write mpg() function prototype, that takes two type double arguments and returns a double
- ADouble mpg(double a, double b)
- BVoid mpg(){}
- CFloat mpg(int a){ float b = 1; return b;}
- DDouble mpg(int a, double b)
1010. What is data structure?
- Ais a group of data elements grouped together under one name
- Bis a group of data elements grouped together under two names.
- Cis a set of some elements grouped together under value
- Dis a group of data elements together with some name.
1111. The data elements in structure are also known as what?
- AMembers
- BData
- CObjects
- DNone of the above
1212. What will be used when terminating a structure?
- ASemicolon
- BColon
- CBrackets
- DDot
1313. Which stream class is used to both read and write on files?
- AFstream
- BIostream
- COfstream
- DIfstream
1414. Which stream class is only used to read files
- AIfstream
- BOfstream
- CIostream
- DFstream
1515. What is the difference between array and structure?
- AStructure can include members of different data types
- BNo difference
- COnly on their declaration
- DArrays can include only integers
1616. What is the output from the following program code?

- A10 10 10 10 10
- B11 11 11 11 11
- C10
- D0 1 2 3 4
- EError
1717. The OR (||) operator:
- AStops evaluation upon finding one condition to be true
- BHas higher precedence that AND (&&) operator
- CTrue if all conditions are true
- DAssociates from right to left
1818. Which of the following for headers is not valid for C++ code?
- Afor (integer i =0; j<10; i++);
- Bfor (int i = 0; i<9; i++)
- Cfor (int i = 0; i<8; i++)
- Dfor (int i = 0; i<7; i++)
- Eall
1919. There might be functions with the same name, but different arguments. The function called is the one whose arguments match the invocation. What is this mean?
- AFunction overloading
- BFunction overprocessing
- CArgument type error
- DArgument dispatch error
2020. Which of the following cannot be used to create a random numbers?
- Astructures
- Bfloat
- Cint
- Dnone of the mentioned
2121. Please evaluate !(1 && !(0 || 1)).
- ATrue
- BFalse
- CUnevaluatable
- DNot sure
2222. What is the final value of x when the code int x; for(x=0; x<50; x++) {} is run?
- A10
- B50
- C0
- D51
2323. How many times is a do while loop guaranteed to loop?
- A0
- BInfinitely
- C1
- DVariable
2424. What is the output of the following code?

- Avalue
- B77.5
- CFloat
- DVariable
2525. Which of the following is a valid function call (assuming the function exists)?
- Afunct;
- Bfunct x, y;
- Cfunct();
- Dstruct funct();
2626. Which of the following is a complete function?
- Aint funct();
- Bint funct(int x) {return x=x+1;}
- Cvoid funct[int] {cout&tl;<"Hello"}
- Dvoid funct{x} {cout<<"Hello"}
2727. Which of the following is required to avoid falling through from one case to the next?
- AEnd;
- BBreak;
- CStop;
- DA semicolon;
2828. Which of the following is the proper declaration of a pointer?
- Aint x;
- Bint &x;
- Cptr x;
- Dint *x;
2929. Which of the following gives the memory address of integer variable a?
- A*a;
- Ba;
- C&a;
- Daddress(a);
3030. Which of the following gives the memory address of a pointer a?
- Aa;
- B*a;
- C&a;
- Daddress(a);
3131. Which of the following gives the value stored at the address pointed to by the pointer a?
- Aa;
- Bval(a);
- C*a;
- D&a;
3232. Which of the following gives the value stored at the address pointed to by the pointer ptr?
- Aptr;
- Bval(ptr);
- C*ptr;
- D&ptr;
3333. Which of the following accesses a variable in structure b?
- Ab->var;
- Bb.var;
- Cb-var;
- Db>var;
3434. Which of the following accesses a variable in structure mystruct?
- Amystruct ->var;
- Bmystruct.var;
- Cmystruct -var;
- Dmystruct >var;
3535. Which of the following correctly accesses the seventh element stored in diana, an array with 100 elements?
- Adiana[6]
- Bdiana[7]
- Cdiana(7)
- Ddiana;
3636. What is the correct way to write the condition y < x < z?
- A((y < x) && (x < z))
- B((y < x) || (x < z))
- C((y < x) & (x < z))
- D((y < x) AN (x < z))
3737. The value 132.54 can represented using which data type?
- ADouble
- BVoid
- CInteger
- DBool
3838. In an assignment statement “ a=b; ” which of the following statement is true?
- AThe variable a and the variable b are equal.
- BThe value of b is assigned to variable a but the later changes on variable b will not effect the value of variable
- CThe value of variable a is assigned to variable b and the value of variable b is assigned to variable a.
3939. The difference between while structure and do structure for looping is
- AIn while statement the condition is tested at the end of first iteration
- BIn do structure the condition is tested at the beginning of first iteration
- CThe do structure decides whether to start the loop code or not whereas while statement decides whether to repeat the code or not
- DIn while structure condition is tested before executing statements inside loop whereas in do structure condition is tested before repeating the statements inside loop
4040. A function that calls itself for its processing is known as
- AInline Function
- BNested Function
- COverloaded Function
- DRecursive Function
4141. The keyword endl
- AEnds the execution of program where it is written
- BEnds the output in cout statement
- CEnds the line in program. There can be no statements after endl
- DEnds current line and starts a new line in cout statement
4242. Strings are character arrays. The last index of it contains the nullterminated character
- A\n
- B\t
- C\0
- D\1
4343. Variables inside parenthesis of functions declarations have _____ level access
- ALocal
- BGlobal
- CModule
- DUniversal
4444. Array indexing always starts with the number
- A0
- B1
- C-1
- D10
4545. Which of the following accesses a variable in structure st1?
- Ast1->var;
- Bst1.var;
- Cst1-var;
- Dst1>var;
4646. Which looping process is best used when the number of iterations is known?
- AFor
- BWhile
- CDo-while
- DNothing
4747. If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block?
- Aparentheses ( )
- Bbraces { }
- Cbrackets [ ]
- Darrows < >
4848. A memory address is…
- Awhere a variable is stored.
- Bwhere a variable is defined.
- Cwhere a variable is declares.
- Dwhere a variable is print out.
4949. The set of instructions that a computer will follow is known as..
- Aprogram
- Bvariable
- Ccomputer
- Dbrackets
5050. cin >> number; is
- Aan output statement
- Ba colon
- Ca variable
- Dan input statement
5151. cout << "How many items would you want?\n"; is
- Aan output statement
- Ba colon
- Ca variable
- Dan input statement
5252. int number; is
- Aan output statement
- Ba variable declaration
- Ca variable
- Dan input statement
5353. If x is 0, what is the value of (!x == 0)?
- ATrue
- BFalse
- C2
- D15
5454. How to create array with n integers?
- Aint n; cin >> n; int a = new# int[n];
- Bint n; cin >> n; int& a; a = new int[n];
- Cint n; cin >> n; int* a; a = new int[n];
- Dint n; cin >> n; int a; a = new% int[n];
5555. Which class should be included to work with files?
- Aiostream
- Bstring
- Ccmath
- Dfstream
5656. Which of the following is the output from the following C++ code?

- A15 14 13 12 11 10
- B15 14 13 12 11 10 9
- C9
- D15
5757. If originally x=0, y=1, and z=3, what is the value of x, y, and z after executing the following code ?

- Ax=0 y=3 z=3
- Bx=0 y=1 z=3
- Cx=3 y=3 z=3
- Dx=3 y=1 z=0
5858. What is the value of x after the following statements?

- A10
- B33
- C3
- D0
5959. What is the value of x after the following statements?

- A15
- B3
- C4
- D0
6060. Which of the following is the output from the following C++?

- A5
- B0
- C4
- D6
6161. Given the following code fragment, what is the final value of y?

- A8
- B2
- C4
- D3
6262. Which of the following is the output from the following C++ code

- A10
- B12
- C3
- D4
6364. Which of the following is the final value of y from the following C++ code

- A2
- B3
- C22
- D0
6463. Which of the following is the output from the following C++ code?

- A6
- B0
- C4
- D5
6565. Which of the following is the final value of ‘i’ from the following C++ code ?

- A5
- B4
- C0 1 2 3 4
- D0 1 2 3 4 5
6666. What is the value of x after the following code executes?

- A10
- B11
- C13
- D0
6767. Given the following code, what is the final value of i?

- A2
- B4
- C3
- D0
6868. What is the value of x after the following code executes?

- A10
- B11
- C13
- D0
6969. What is the output of the following code segment?

- A15
- B25
- C5
- D0
7070. What does the following code print to the screen?

- A7
- Bcout
- Cint
- Dworld
7171. What is the value of x after the following statements?

- A15
- B10
- C5
- D25
7272. What is the value of x after the following statements?

- A25
- B4
- C5
- D1
7373. What is the value of x after the following code executes?

- A10
- B11
- C23
- D13
7474. Given the following code, what is the final value of i?

- A5
- B2
- C3
- D0
7575. Given the following code, what is the final value of i?

- A4
- B6
- C5
- D0
7676. Which of the following is the valid array declaration
- Aint num(5)
- Bint mycat[5]
- CArray. double[5] marks
- DMyarray.counter int[5]
7777. What is the output of the following code?

- A7
- BValue
- C1
- D6
7878. What is the value of x after the following statements ?

- A11
- B10
- C0
- D12
7979. What is the final output of the following code fragment ?

- A22
- B23
- C20
- D0
8080. Solve the following piece of code and choose the best answer?

- AThe function addition is called by passing the values
- BThe function addition is called by passing reference
- CBoth of above
- DNone of above
8181. If the type specifies of parameters of a function is followed by an ampersand &, that function call is…
- APass by value
- BPass by reference
- CAll of answers
- DNone of answers
8282. Which of the following gives the memory address of a pointer pt1?
- A*pt1;
- Bpt1;
- C&pt1;
- Daddress(ptr1);
8383. What is the value of x after the following statement?

- A1.75
- B50
- C30
- D20
8484. What is the final value of x after the following fragment of codeexecutes ?

- AInfinite loop
- BNever
- C1
- D0
8585. What is the value of x after the following statement?

- A3.75
- B1.75
- C2
- D0
8686. What is the value of x after the following statements ?

- A7
- B10
- C3
- D33
8787. What is the value of x after the following statements?

- A70
- B30
- C3
- D33
8888. Given the following code fragment, what is the output

- A5
- BThat is all. Goodbye
- CX is bigger than 5
- DX
8989. How many times is "Hi" printed to the screen ?

- A0
- B1
- C14
- D15
9090. How to read file and take first string?
- AFile should be created before running the code : “input.txt” .

- BNo need to create file before running the code, code will create it by itself.

- CFile should be created before running the code: “input.txt” .

- DNo need to create file before running the code, code will create it by itself .

- AFile should be created before running the code : “input.txt” .
9191. How to write to file?
- AFile should be created before running the code: “output.txt” .

- BNo need to create file before running the code, code will create it by itself .

- CFile should be created before running the code: “output.txt” .

- DNo need to create file before running the code, code will create it by itself

- AFile should be created before running the code: “output.txt” .
9292. There is given array with n elements, created as pointer.
How to remove it correctly?
- Adelete a;
- Bdelete[] a;
- Cremove[] a;
- Dremove a;
9393. How to write correct recursive function for making sum of n numbers?
- AThis

- BThis

- CThis

- DThis

- AThis
9494. How to make several items in structure? Just think that you have “HOME”, and n items in it

- AThis

- BThis

- CThis

- DThis

- AThis
9595. Find mistake of next cod ?

- ANo mistakes, it will just read from file and print first string in command line
- BMistake in opening file, should be: file.open(“input.txt”);
- CIt should write in other file; it can’t write directly to command line.
- DIt should read from read from file, when we want to write in command line.
9696. What will print in command line next code ?

- ARead first string from file “input.txt”, and print it in command line.
- BIt will give an error, because, file should read in this way: file.open(“input.txt”);
- CIt won’t print anything.
- DRead all lines and print it in new file.
9797. Which one will be correct function for ?
- AThis

- BThis

- CThis

- DThis

- AThis
9898. There are given array “numbers” with 10 numbers. How to make sum of all numbers, which are located in odd indexes?
- AThis

- BThis

- CThis

- DThis

- AThis
9999. There is given string named “str”. How to print in command line length of str?
- Acout << str.count();
- Bcout << str.length;
- Ccout << str.lenth();
- Dcout >> str.lenth();
100100. How to implement array of chars with 10 elements?
- Achar* chs; chs = new char(10);
- Bchar chs; chs = char[10];
- Cchar chs[10];
- Dchar chs[] = new char[10];
101101. How to implement array of integer numbers with n elements, and how to delete them correctly?
- Aint n; cin >> n; int* a; a = new% int[n]; delete[] a;
- Bint n; cin >> n; int& a; a = new int[n]; delete[] a;
- Cint n; cin >> n; int* a; a = new@ int[n]; delete[n] a;
- Dint n; cin >> n; int* a; a = new& int[n]; for(int
i=0; i<n; i++) delete a;
102
102. How to get whole string in one line (in command line)?- Astring s; getline(cin, s);
- Bstring s; getline(cout, s);
- Cstring s; cin >> s;
- Dstring s; cout << s;
103103. How to get whole string in one line (in file)?
- Aifstream file; string s; getline(file, s);
- Bifstream file; string s; getline(cin, s);
- Cifstream file; string s; getline(cout, s);
- Difstream file; string s; file >> s;
104104. Why do we need library?
- ATo work with strings.
- BTo work with files.
- CTo work with mathematical functions.
- DTo work with our own libraries.
105105. Why do we need library <cmath>?
- ATo work with strings.
- BTo work with mathematical functions.
- CTo work with command line.
- DTo work with our own libraries.
106106. Where is the mistake of the code ?

- AVariable “a” do not have any values.
- BLibrary didn’t included.
- CLibrary didn’t included.
- DLibrary didn’t included
107107. What will be printed in the part of the cod?

- A1 4 7 10
- B0 3 6 9
- C3 6 9
- D9 6 3 0
108108. What will be printed in the part of the code?

- A0 8 16 24 32
- B2 10 18 26 34
- C6 12 20 28 36
- D4 10 18 26 34
109109. Which of the following is the proper keyword to allocate memory?
- Anew
- Bmalloc
- Ccreate
- Dvalue
110110. Which of the following is the proper keyword to deallocate memory?
- Afree
- Bdelete
- Cclear
- Dremove
111111. Assume if A = 10; and B = 15; with using bitwise OR operator Find A||B
- A10
- B15
- C61
- D13
112112. The notation of logical NOT operator in a C++ program is
- A!
- B:
- C;
- DNone of above
113113. Which of the following denote C++ looping statement?
- AAll of them
- Bfor
- Cwhile
- Ddo-while
114Cin in C++ program uses the operator
- A>>
- B<<
- C>
- D||
115What is the minimum number of times a do loop would definitely get executed?
- A1
- Binf
- C0
- DNone of the above
116The function named as exforsys declared as int exforsys(float x, double y) has return type as
- Aint
- Bchar
- Cdouble
- Dstring
117Which of the following is mandatory for all C++ program?
- Amain()
- Bvoid()
- Csystem()
- DNone of the above
118Which of the following denote newline character in C++ program?
- A“\n”
- Bend
- C“/n”
- Denl
119Which of the following is used to group a set of objects and functions under a name?
- Anamespace
- Bname
- Cnamearea
- Dareaname
120What is the notation used to place block of statements in a looping structure in C++?
- A{ }
- B[ ]
- C( )
- D" "
121What is the notation used show the size of array?
- A[ ]
- B{ }
- C( )
- D" "
122How many values can be returned by a C++ function?
- A1
- BInf
- C0
- DNone of the above
123123. Which of the following is returned by the system if a C++ program completes successfully?
- A0
- B1
- C-1
- DInf
124124. The variables that can be used only within the function in which it is declared is called as
- Alocal
- Bglobal
- Cboth of them
- Dnone of them
125125. Comments in C++ program is written by using
- A//
- B--
- C<!-->
- D<>
126126. The array exforsys[10] can be declared using pointers as
- A* exforsys[ ]
- Bexforsys[ ]
- C$exforsys[ ]
- D&exforsys[ ]
127127. Default size of int in c++ (in bytes)
- A4
- B8
- C16
- D2
128128. Default size of double in c++ (in bytes)
- A16
- B8
- C4
- D2
129129. Default value of boolean
- Afalse
- Btrue
130130. If a function in C++ does not return a value then its return type is denoted as
- Avoid
- Bint
- Cdouble
- Dbool
131131. A user defined header file is included by following statement in general.
- A#include "file.h"
- B#include <file.h>
- C#include file.h
- D#include <file>
132132. An inline function can execute faster than a normal function.
- ATrue
- BFalse
133133. What value must a destructor return?
- ADestructors do not return a value.
- BA pointer to the class.
- CAn object of the class.
- DA status code determining whether the class was destructed correctly
134134. What character ends all strings?
- A‘\o’
- B‘\n’
- C‘’
- D‘.’
135135. Which of the following reads in a string named x with one hundred characters?
- Acin.getline(x, 100, '\n');
- Bcin.getline(100, x, '\n');
- Creadline(x, 100, '\n');
- Dread(x);
136136. Which of the following functions compares two strings?
- Astrcmp();
- Bcmp();
- Cstringcompare();
- Dcompare();
137137. Which of the following adds one string to the end of another?
- Astrcat();
- Bappend();
- Cstradd();
- Dstringadd();
138138. Which of the following correctly declares an array?
- Aint anarray[10];
- Bint anarray;
- Canarray{10};
- Darray anarray[10];
139139. What is the index number of the last element of an array with 29 elements?
- A28
- B29
- C0
- D27
140140. Which of the following is a two-dimensional array?
- Aint anarray[20][20];
- Barray anarray[20][20];
- Cint array[20, 20];
- Dchar array[20];
141141. Which of the following correctly accesses the seventh element stored in foo, an array with 100
elements?- Afoo[6]
- Bfoo[7]
- Cfoo(6)
- Dfoo
142142. Which of the following accesses a variable in structure b?
- Ab.var
- Bb->var
- Cb-var
- Db>var
143143. Which of the following accesses a variable in structure *b?
- Ab->var
- Bb.var
- Cb-var
- Db>var
144144. Which of the following is a properly defined struct?
- Astruct a_struct {int a;};
- Bstruct a_struct {int a;}
- Cstruct {int a;}
- Dstruct a_struct int a;
145145. Which properly declares a variable of struct foo?
- Afoo var
- Bstruct foo
- Cfoo
- Dint foo
146146. Which of the following is the proper declaration of a pointer?
- Aint *x;
- Bint &x;
- Cptr x;
- Dint x;
147147. Which of the following gives the memory address of integer variable a?
- A&a;
- B*a;
- Caddress(a);
- Da;
148148. Which of the following gives the value stored at the address pointed to by the pointer a?
- A*a;
- B&a;
- Ca;
- Dval(a);
149149. Which of the following is the proper keyword to allocate memory?
- Anew
- Bmalloc
- Ccreate
- Dvalue
150150. Which of the following is the proper keyword to deallocate memory?
- Adelete
- Bclear
- Cremove
- Dfree
151151. What is the notation used to place block of statements in a looping structure in C++?
- A{ }
- B[ ]
- C( )
- D" "
152152. What is the notation used show the size of array?
- A[ ]
- B{ }
- C( )
- D" "
153153. How many values can be returned by a C++ function?
- A1
- BInf
- C0
- DNone of the above
154154. Which of the following is returned by the system if a C++ program completes successfully?
- A0
- B1
- C-1
- DInf
155155. The variables that can be used only within the function in which it is declared is called as
- Alocal
- Bglobal
- Cboth of them
- Dnone of them
156156. Comments in C++ program is written by using
- A//
- B--
- C<!-->
- D<>
157157. The array exforsys[10] can be declared using pointers as
- A* exforsys[ ]
- Bexforsys[ ]
- C$exforsys[ ]
- D&exforsys[ ]
158158. Default size of int in c++ (in bytes)
- A4
- B8
- C16
- D2
159159. Default size of double in c++ (in bytes)
- A16
- B8
- C4
- D2
160160. Default value of boolean
- Afalse
- Btrue
161161. If a function in C++ does not return a value then its return type is denoted as
- Avoid
- Bint
- Cdouble
- Dbool
162162. A user defined header file is included by following statement in general.
- A#include “file.h”
- B#include <file.h>
- C#include file.h
- D#include <file>
163163. An inline function can execute faster than a normal function.
- ATrue
- BFalse
164164. What value must a destructor return?
- ADestructors do not return a value.
- BA pointer to the class.
- CAn object of the class.
- DA status code determining whether the class was destructed correctly
165165. What character ends all strings?
- A‘\o’
- B‘\n’
- C‘’
- D‘.’
166166. Which of the following reads in a string named x with one hundred characters?
- Acin.getline(x, 100, '\n');
- Bcin.getline(100, x, '\n');
- Creadline(x, 100, '\n');
- Dread(x);
167167. Which of the following functions compares two strings?
- Astrcmp();
- Bcmp();
- Cstringcompare();
- Dcompare();
168168. Which of the following adds one string to the end of another?
- Astrcat();
- Bappend();
- Cstradd();
- Dstringadd();
169169. Which of the following correctly declares an array?
- Aint anarray[10];
- Bint anarray;
- Canarray{10};
- Darray anarray[10];
170170. What is the index number of the last element of an array with 29 elements?
- A28
- B29
- C0
- D27
171171. Which of the following is a two-dimensional array?
- Aint anarray[20][20];
- Barray anarray[20][20];
- Cint array[20, 20];
- Dchar array[20];
172172. Which of the following correctly accesses the seventh element stored in foo, an array with 100
elements?- Afoo[6]
- Bfoo[7]
- Cfoo(6)
- Dfoo
173173. Which of the following accesses a variable in structure b?
- Ab.var
- Bb->var
- Cb-var
- Db>var
174174. Which of the following accesses a variable in structure *b?
- Ab->var
- Bb.var
- Cb-var
- Db>var
175175. Which of the following is a properly defined struct?
- Astruct a_struct {int a;};
- Bstruct a_struct {int a;}
- Cstruct {int a;}
- Dstruct a_struct int a;
176176. Which properly declares a variable of struct foo?
- Afoo var
- Bstruct foo
- Cfoo
- Dint foo
177177. Which of the following is the proper declaration of a pointer?
- Aint *x;
- Bint &x;
- Cptr x;
- Dint x;
178178. Which of the following gives the memory address of integer variable a?
- A&a;
- B*a;
- Caddress(a);
- Da;
179179. Which of the following gives the value stored at the address pointed to by the pointer a?
- A*a;
- B&a;
- Ca;
- Dval(a);
180180. Which of the following is the proper keyword to allocate memory?
- Anew
- Bmalloc
- Ccreate
- Dvalue
1811. Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
cout << ( b * a + c *d --);- A26
- B24
- C22
- D28
182181. Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
cout << (++d);- A6
- B5
- C1
- D4
183182. Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
cout << (c = d + c++);- A9
- B10
- C8
- D4
184183. Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
cout << (c = d + ++c);- A10
- B9
- C4
- D8
1852. In a class definition, the special method provided to be called to create an instance of that
class is known as a/an- AConstructor
- BDestructor
- CObject
- DCompiler
186184. ……………….. are used to document a program and improve its readability.
- AComments
- BKeywords
- CControl structures
- DBlocks
187185. Members of a class specified as ……………….. are accessible only to methods of that
class.- Aprivate
- Bpublic
- Cprotected
- Dnone of them
188186. Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
cout << ( --b * a + c *d --);- A24
- B21
- C22
- D28
189187. Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
cout << (a++);- A2
- B1
- CSyntax error
- D3
190188. Use the following declaration and initialization to evaluate the Java expressions
int a = 2, b = 3, c = 4, d = 5;
cout << (c = c++);- A4
- B5
- C8
- D2
191189. Identify, from among the following, the incorrect variable name
- A2ndName
- B_theButton
- Cmy2ndFont.
- DCurrentWeatherStateofplanet
192190. An overloaded method consists of:
i) The same method name with different types of parameters
ii) The same method name with different number of parameters
iii) The same method name and same number and type of parameters- ABoth i and ii
- Ball of them
- Cnone of them
- Donly i
193191. You read the following statement in a C++ program that compiles and executes.
submarine.dive(depth);
What can you say for sure?- Adive must be a method.
- Bdepth must be an int
- Csubmarine must be the name of a class
- Dsubmarine must be a method.
194192. What is the type and value of the following expression?
- 4 + 1/2 + 2*-3 + 5.0- Adouble -5.0
- Bint -5
- Cdouble -4.5
- Dnone of the above
195193. What is printed by the following statement?
cout << (“Hello,\nworld!”);- AHello,
world! - BHello, \nworld!
- CHello, world
- D“Hello, \nworld!”
- AHello,
196194. Which of the following variable declaration would NOT compile in a java program?
- Aint 1_var;
- Bint var_1;
- Cint var;
- Dint VAR;
1973. _________ is a paradigm based on the concepts of “object” that contains data and methods
- AObject-oriented programming
- BObject-based programming
- CData-oriented programming
- DMethod-oriented programming
198195. Two or more methods with same name in the same class with different arguments is called as
- AMethod overloading
- BMethod overriding
- CMethod overridden
- Dnone of the above
199196. Constructors are used to
- AInitialize a newly create object.
- BFree memory
- CTo create a subclass
- DTo build a user interface
200197. Syntax of loop
for (declaration; condition; increment/decrement){}- AFalse
- BTrue
Informações
- Descrição
- Olzhas
- Autor
- Айдана Шырманбай
- Idioma
- English
- Visualizações
- 458
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz