Home
Current Affairs January 2024

What is the correct answer?

4

char *s[10] defines an array of ------------------------

A. pointers to strings

B. string to pointer

C. both

Correct Answer :

A. pointers to strings


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

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

A. / + *

B. * / +

C. + / *

D. * / + -

What is the correct answer?

4

Which of the following is not a preprocessor directive

A. #if

B. #elseif

C. #undef

D. #pragma

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

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

A. 0

B. NULL

C. 1

D. none of the above

What is the correct answer?

4

What will be output if you will compile and execute the following c code?


#include 
#define x 5+2
int main(){
int i;
i=x*x*x;
printf("%d",i);
return 0;
}


A. 27

B. 343

C. 233

D. Compiler Error

What is the correct answer?

4

char *s[10] defines an array of ------------------------

A. pointers to strings

B. string to pointer

C. both

What is the correct answer?

4

The main() function can call itself recursively.

A. True

B. False

What is the correct answer?

4

Left shift operator rotates the bits on the left and places them to the right.

A. True

B. False

What is the correct answer?

4

What is right way to Initialization array?

A. int num[6] = { 2, 4, 12, 5, 45, 5 } ;

B. int n{} = { 2, 4, 12, 5, 45, 5 } ;

C. int n{6} = { 2< 4< 12 } ;

D. int n(6) = { 2, 4, 12, 5, 45, 5 } ;

What is the correct answer?

4

When a user defined function is defined in program, then it has to be called at least once from the main().

A. True

B. False

What is the correct answer?

4

The default initial value of automatic storage class is 0.

A. True

B. False

What is the correct answer?

4

A recursive function calls itself again and again.

A. True

B. False

What is the correct answer?

4

Which one of the following is not a fundamental data type in C++

A. float

B. string

C. int

D. wchar_t

What is the correct answer?

4

The output of the following code is:
void main() 
{
int a = 0;
while (a<=50) for(;;) if(++a % 50==0) break;
printf("a = %d", a);
}

A. a = 100

B. a = 50

C. compilation error

D. runtime error

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

All elements of a structure are allocated contiguous memory locations.

A. True

B. False

What is the correct answer?

4

The -------------------------- loop executes at least once.

A. for

B. while

C. do-while

D. while & do-while

What is the correct answer?

4

If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?

A. const X* const

B. X* const

C. X*

D. X&

What is the correct answer?

4

An array elements are always stored in _________ memory locations.

A. Sequential

B. Random

C. Sequential and Random

D. None of the above

What is the correct answer?

4

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

A. 35

B. 45

C. 55

D. 40

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

void' is a datatype.

A. True

B. False

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

The output of the following code is:
void main() 
{
int a = 1, b=2;
int *ip;
ip=&a;
b=*ip;
printf("%d", b);
}

A. 2

B. 1

C. 100

D. 0

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

Character data types cannot be declared as unsigned.

A. True

B. False

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 C language.
/* is a procedural language .*/*/
The above statement is valid.

A. True

B. False

What is the correct answer?

4

The-------------------- statement helps immediate exit from any part of the loop

A. break

B. continue

C. exit

D. All of the above