Home
Current Affairs January 2024

What is the correct answer?

4

Which of the following language is predecessor to C Programming Language?

A. A

B. B

C. BCPL

D. C++

Correct Answer :

B. B


Related Questions

What is the correct answer?

4

The output of the following code is:
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}

A. 21 21

B. 20 21

C. 21 20

D. 20 20

What is the correct answer?

4

Which of the following is not true about preprocessor directives

A. They begin with a hash symbol

B. They are processed by a preprocessor

C. They form an integral part of the code

D. They have to end with a semi colon

What is the correct answer?

4

A C variable cannot start with

A. An alphabet

B. A number

C. A special symbol other than underscore

D. both (b) and (c)

What is the correct answer?

4

------ is the ternary operator

A. ?,-

B. ?,:

C. ++<--

D. none of the above

What is the correct answer?

4

printf() is not a library function.

A. True

B. False

What is the correct answer?

4

An array declared as A[100][100] can hold a maximum of 100 elements.

A. True

B. False

What is the correct answer?

4

Nested macros are allowed.

A. True

B. False

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

The output of the following code is:
main() 
{
int sub[50];
for(i=0; i<=48;i++)
{
sub[i]=i;
printf("
%d", sub[i]);
}
}

A. 0 to 48 will be displayed

B. 48

C. 49

D. Compilation Error

What is the correct answer?

4

fprintf()function can be used to write into console.

A. True

B. False

What is the correct answer?

4

A declaration float a, b; occupies ___ of memory

A. 1 byte

B. 4 bytes

C. 8 bytes

D. 16 bytes

What is the correct answer?

4

The same variable names of automatic type can be used in different functions without any conflict.

A. True

B. False

What is the correct answer?

4

/* The C language.
/* is a procedural language .*/*/
The above statement is valid.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
void main() 
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }

A. 3.999999

B. Error

C. 3

D. 3.000000

What is the correct answer?

4

The expression "b = 3 ^ 2;" will evaluate b = 9.

A. True

B. False

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

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

static variable will not always have assigned value.

A. True

B. False

What is the correct answer?

4

What's wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);

A. the question mark should be an equal sign

B. the first semicolon should be a colon

C. there are too many variables in the statement

D. the conditional operator is only used with apstrings

What is the correct answer?

4

Which of the following is invalid?

A. ''

B. " "

C. 'a'

D. abc'

What is the correct answer?

4

gets() and puts() are unformatted I/O functions.

A. True

B. False

What is the correct answer?

4

Which of the STL containers store the elements contiguously (in adjecent memory locations)?

A. std::vector

B. std::list

C. std::map

D. std::set

What is the correct answer?

4

do-while loop is useful when we want the statements within the loop must be executed

A. Only once

B. At least once

C. More than Once

D. Any one of the above

What is the correct answer?

4

No commas or blanks are allowed within an integer or a real constant.

A. True

B. False

What is the correct answer?

4

The expression (i + j)++ is illegal.

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

Which of the following is not recommended in a header file?

A. Type definitions (typedefs)

B. Class definitions

C. Function definitions

D. Template definitions

What is the correct answer?

4

The output of the following code is:
void main()
{
int z, a = 5, b = 3; z = a * 2 + 26 % 3;
printf("%d", z); }

A. 10

B. 0

C. 12

D. None of the above

What is the correct answer?

4

Union is used to hold different data at different time.

A. True

B. False

What is the correct answer?

4

Only one break can be used in one loop.

A. True

B. False