NEW
Font size
WorksheetsTECHNOSTORM 2K22 R1 ( BATCH 4 )
Total questions: 30
Worksheet time: 6mins
The statement char ch = ‘Z’ would store in ch
(1) The character Z
(2) ASCII value of Z
(3) Z along with the single inverted commas
(4) Both (1) and (2)
The maximum value that an integer constant can have is ...........
a. -32767
b. 32767
c. 1.7014e+38
d. -1.7014e+38
Which of the following statement is wrong ?
mes = 123.56;
con= 'T' * 'A';
this = 'T' * 20;
3+a=b;
If 'a' is an integer variable , a = 5/2; will return a value:
a. 2.5
b. 2
c. 3
d. 0
Local variables are also called as ..............
a. Global
b. External
c. Scope
d. Automatic
............. variables are permanent variables within their own function or life .
a. Auto
b. Static
c. Extern
d. Register
If an array is used as function argument , the array is passed
a. by value
b. by reference
c. by name
d. the array cannot be used as a function argument
The ............... function will sort any type of array.
(A) tab()
(B) tab out()
(C) sort()
(D) bubble()
The specification of the number 100 as long int is .............
(A) L100
(B) 100
(A) 100L
(A) 100l
Which of the following is FALSE in C :
(A) Keywords can be used as variable names
(B) Variable names can contain a digit
(C) Variable names do not contain a blank space
(D) Capital letters can be used in variable names
How many times the following loop be executed
{
…
ch = ‘b’;
while(ch >= ‘a’ && ch <= ‘z’)
ch++;
}
(A) 0
(B) 25
(C) 26
(D) 1
The keyword ................ is used to declare a generic function.
(A) generic (B) template
(C) virtual (D) friend
(A) generic
(B) template
(C) virtual
(D) friend
C++ begins its execution with ................
(A) header file
(B) main
(C) class
(D) declaration
The ............... term refers to the value that is used to call a function.
(A) parameter
(B) argument
(C) variable
(D) pointer
What would be returned by the following recursive function after we call test (0, 3)
int test (int a, int b)
{
if (a==b) return (1);
else if (a>b) return(0);
else return (a+test(a+1, b));
}
(A) 1
(B) 2
(C) 3
(D) 4
The size of array int a[5]={1,2} is
(A) 4
(B) 12
(C) 10
(D) 6
Recursion is sometimes called ..................
(A) Circular definition
(B) Complex definition
(C) Procedure
(D) Union
>> is called as ............. operator.
(A) Insertion
(B) Extraction
(C) Greater than
(D) Lesser than
The ................ operation returns the remains of a divisions operation .
(A) .!
(B) &&
(C) %
(D) /
The declaration of a two dimensional array called list with dimensions 4 X 9 is represented as ..................
(A) int list [4] [9]
(B) int list [9][4]
(C) int list [4,9]
(D) int list[9,4]
The content of file will be lost if it is opened in
(A) w mode
(B) w+ mode
(C) a mode
(D) a+ mode
The name of all functions end with a
(A) pair of parenthesis
(B) semicolon
(C) braces
(D) colon
The built-in library function ceil(x) requires the ................... header file.
(A) <ctype.h>
(B) <math.h>
(C) <stdlib.h>
(D) <time.h>
Which type of data file is analogous to an audio cassette tape?
(A) random access file
(B) sequential access file
(C) binary file
(D) source code file
The value of an automatic variable that is declared but not initialised will be
(A) 0
(B) -1
(C) unpredictable
(D) none of these
Which of the following declarations are illegal?
(A) void *ptr;
(B) char *str = “hello”;
(C) char str = “hello”;
(D) const *int p1;
The address of a variable temp of type float is
(A) *temp
(B) &temp
(C) float& temp
(D) float temp&
Within a switch statement
(A) Continue can be used but Break cannot be used
(B) Both Continue and Break can be used
(C) Continue cannot be used but Break can be used
(D) Neither Continue nor Break can be used
How many constructors can a class have?
(A) 0
(B) 1
(C) 2
(D) any number
What will be the result of the expression 13 & 25?
(A) 38
(B) 25
(C) 9
(D) 12
