Home
Current Affairs January 2024

What is the correct answer?

4

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

A. True

B. False

Correct Answer :

B. False


Related Questions

What is the correct answer?

4

What is the difference between overloaded functions and overridden functions?

A. Overloading is a dynamic or run-time binding and Overriding is static or compile-time binding

B. Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called a overloaded fucntion.

C. Overloading is a static or compile-time binding and Overriding is dynamic or run-time binding

D. Redefining a function in a friend class is called function overloading while Redefining a function in a derived class is called as overridden fucnion.

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

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

A. pointers to strings

B. string to pointer

C. both

What is the correct answer?

4

unsigned' is a valid variable name.

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

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

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

A. delete

B. concatenate

C. compare

D. none of the above

What is the correct answer?

4

Nested macros are allowed.

A. True

B. False

What is the correct answer?

4

void' is a datatype.

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 size of signed integer is ------ bytes.

A. 4

B. 2

C. 8

D. 10

What is the correct answer?

4

&& and & operators have the same meaning.

A. True

B. False

What is the correct answer?

4

Which of the following is invalid?

A. ''

B. " "

C. 'a'

D. abc'

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

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

Which of the following is an example of compounded assignment statement?

A. a = 5

B. a += 5

C. a = b = c

D. a = b

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

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

A. for

B. while

C. do-while

D. while & do-while

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

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

Only one break can be used in one loop.

A. True

B. False

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

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

What's wrong? while( (i < 10) && (i > 24))

A. the logical operator && cannot be used in a test condition

B. the while loop is an exit-condition loop

C. the test condition is always true

D. the test condition is always false

What is the correct answer?

4

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

A. True

B. False

What is the correct answer?

4

fopen() function returns a pointer to the open file.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
void change (char *k) 
{
k="Hello";
return;
}
main()
{
char *ch = "World";;
change(ch);
printf("%s", ch);
}

A. Hello

B. World

C. Compilation error

D. Hello World

What is the correct answer?

4

The expression "int i = j = k = 0;" is invalid.

A. True

B. False