Home
Current Affairs January 2024

What is the correct answer?

4

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

A. True

B. False

Correct Answer :

A. True


Related Questions

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

The main() function can call itself recursively.

A. True

B. False

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

Single operations involving entire arrays are permitted in C.

A. True

B. False

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

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

A. True

B. False

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 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

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

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

The function fopen() on failure returns---------------------.

A. 0

B. NULL

C. 1

D. none of the above

What is the correct answer?

4

What is the right way to access value of structure variable book{ price, page }?

A. printf("%d%d", book.price, book.page);

B. printf("%d%d", price.book, page.book);

C. printf("%d%d"< price::book< page::book);

D. printf("%d%d", price>book, page>book);

What is the correct answer?

4

struct stud
{
int roll;
char name[20];
float marks;
} *p;
What will be the byte size of p?

A. 24

B. 2

C. 26

D. None

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

unsigned' is a valid variable name.

A. True

B. False

What is the correct answer?

4

A multidimensional array A[10][9] can store-------- number of elements

A. 91

B. 88

C. 90

D. 89

What is the correct answer?

4

strcat() function ----------------------- two strings.

A. delete

B. concatenate

C. compare

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

The output of the following code is:
void main() 
{
int a;
int &b = a;
a=100;
printf("b=%d\ta=%d
", b,a);
}

A. b=100 a=100

B. b=100 a=0

C. b=0 a=100

D. Error

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

Identify the wrong statement

A. putchar(65)

B. putchar('x')

C. putchar("x")

D. putchar('
')

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 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

printf("%d", sizeof('2')); will print 2.

A. True

B. False

What is the correct answer?

4

Which one of the following is not a valid reserved keyword in C++

A. Explicit

B. Public

C. Implicit

D. Private

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

# define PI = 8;' is the correct declaration of macros.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
main() 
{
xyz: goto abc;
printf("Hello");
abc: printf("World");
goto xyz;
}

A. Infinite loop

B. Hello World

C. World Hello

D. Compilation error

What is the correct answer?

4

What will be output if you will compile and execute the following c code?
#include 
int main()
{
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
return 0;
}

A. Less than

B. Equal

C.

Greater than

D. None of above

What is the correct answer?

4

Bitwise operators can operate upon?

A. double and chars

B. floats and doubles

C. ints and floats

D. ints and chars