Home
Current Affairs January 2024

What is the correct answer?

4

Which of the following correctly describes C++ language?

A. Statically typed language

B. Dynamically typed language

C. Both Statically and dynamically typed language

D. Type-less language

Correct Answer :

D. Type-less language


Related Questions

What is the correct answer?

4

The output of the following code is:
void main() 
{
static int a = 1, b, c;
if (a>=2) b=2; c=3;
printf("%d\t%d", b,c);
}

A. 2 3

B. 0 3

C. 0 0

D. 2 0

What is the correct answer?

4

What is an array?

A. An array is a collection of variables that are of the dissimilar data type.

B. An array is a collection of variables that are of the same data type.

C. An array is not a collection of variables that are of the same data type.

D. None of the above.

What is the correct answer?

4

If 'str' is a string of 7 characters, the statement printf("%4s", str); will display ------characters.

A. 4

B. 7

C. 6

D. 0

What is the correct answer?

4

Every if statement can be converted into an equivalent switch statement.

A. True

B. False

What is the correct answer?

4

C programs are converted into machine language with the help of

A. An Editor

B. A compiler

C. An operating system

D. None of the above

What is the correct answer?

4

Which header file is essential for using strcmp() function?

A. string.h

B. strings.h

C. text.h

D. strcmp.h

What is the correct answer?

4

It is necessary to initialize the array at the time of declaration.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
main() 
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}

A. 0

B. Nothing will be displayed

C. Infinite loop

D. None of the above

What is the correct answer?

4

The output of the following code is:
void main() 
{
char a = 'B';
switch (a)
{
case 'A' : printf("a");
case 'B' : printf("b");
default : printf("c");
}

A. B

B. b

C. bca

D. bc

What is the correct answer?

4

Variables declared as register storage type gets stored in CPU registers.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
int f(int a, int b); 
void main()
{
int a = 12, b=154;
printf("%d", f(a, b));
}
int f(int a, int b)
{
if (a<b) return(f(b, a));
if(b==0) return(a);
return (f(b, a % b));
}

A. 2

B. 1

C. Compilation error

D. Runtime error

What is the correct answer?

4

Nested macros are allowed.

A. True

B. False

What is the correct answer?

4

The statement "for (i = 0, j = 2; j <= 10; j++)" is a valid statement in 'C'.

A. True

B. False

What is the correct answer?

4

Which of the following is a valid destructor of the class name "Country"

A. int ~Country()

B. void Country()

C. int ~Country(Country obj)

D. void ~Country()

What is the correct answer?

4

Structures within structures cannot be created.

A. True

B. False

What is the correct answer?

4

Which among the following is a unconditional control structure

A. do-while

B. if-else

C. goto

D. for

What is the correct answer?

4

Which of the following shows the correct hierarchy of arithmetic operations in C

A. / + *

B. * / +

C. + / *

D. * / + -

What is the correct answer?

4

The array 'char name[10] can consist of a maximum of 9 characters.

A. True

B. False

What is the correct answer?

4

A pointer is an indication of the variable to be accessed next.

A. True

B. False

What is the correct answer?

4

C programming language was developed by

A. Dennis Ritchie

B. Ken Thompson

C. Bill Gates

D. Peter Norton

What is the correct answer?

4

Which of the following correctly describes C++ language?

A. Statically typed language

B. Dynamically typed language

C. Both Statically and dynamically typed language

D. Type-less language

What is the correct answer?

4

In the expression - 'x + y + 3z =20'

A. x + y' is a keyword

B. 3 and 20 are constants

C. 3z is a constant

D. y is a variable and z is a constant

What is the correct answer?

4

A recursive function calls itself again and again.

A. True

B. False

What is the correct answer?

4

Single operations involving entire arrays are permitted in C.

A. True

B. False

What is the correct answer?

4

For 16bit compiler allowable range for integer constants is ______ ?

A. 3.4e38 to 3.4e38

B. 32767 to 32768

C. 32768 to 32767

D. 32668 to 32667

What is the correct answer?

4

The size of signed integer is ------ bytes.

A. 4

B. 2

C. 8

D. 10

What is the correct answer?

4

The contents of a file opened in 'r+' mode cannot be changed.

A. True

B. False

What is the correct answer?

4

What will be output if you will compile and execute the following c code?
#include 
int main(){
int i=320;
char *ptr=(char *)&i;
printf("%d",*ptr);
return 0;
}

A. 1

B. 64

C. 320

D. Compiler Error

What is the correct answer?

4

What is C Tokens?

A. The smallest individual units of c program

B. The basic element recognized by the compiler

C. The largest individual units of program

D. A & B Both

What is the correct answer?

4

There are total ------ numbers of operators in 'C'.

A. 35

B. 45

C. 55

D. 40