Home
Current Affairs January 2024

What is the correct answer?

4

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

A. delete

B. concatenate

C. compare

D. none of the above

Correct Answer :

B. concatenate


Related Questions

What is the correct answer?

4

------ is the ternary operator

A. ?,-

B. ?,:

C. ++<--

D. none of the above

What is the correct answer?

4

The output of the following code is:
main() 
{
int a[10], i;
for (i = 1; I <= 0; i++)
{
scanf("%d", a[i]);
printf("%d", a[i]);
}
}

A. 10

B. Logical error

C. Runtime error

D. 1 to 10 will be displayed

What is the correct answer?

4

The output of the following code is:
#define sqr(x= x*x) 
main()
{
int a = 10, b = 5;
printf("%d, %d", sqr(a+b),sqr(++a));
}

A. 77, 121

B. 225, 121

C. 77< 144

D. Compilation error

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

unsigned' is a valid variable name.

A. True

B. False

What is the correct answer?

4

unsigned char has a range from 0 to ------------

A. 253

B. 254

C. 255

D. 256

What is the correct answer?

4

What's wrong? for (int k = 2, k <=12, k++)

A. the increment should always be ++k

B. the variable must always be the letter i when using a for loop

C. there should be a semicolon at the end of the statement

D. the commas should be semicolons

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

enum helps to create user defined datatype.

A. True

B. False

What is the correct answer?

4

Right shifting an operand 1bit is equivalent to multiplying it by 2.

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

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 value of an enumerated datatype can be read using scanf() function.

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()
{
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

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

Which of the following expressions is wrong

A. float a =123.56;

B. char ch ='T' * 'A';

C. char ch ='T' *20;

D. 3 +a = b;

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 expression (i + j)++ is illegal.

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 options shows the correct hierarchy of arithmetic operators

A. **, * or /, + or -

B. **, *, /, +, -

C. **< /< *< +<-

D. / or *, - or +

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

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

A. True

B. False

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 identifier argv[] is a pointer to an array of strings.

A. True

B. False

What is the correct answer?

4

static variable will not always have assigned value.

A. True

B. False

What is the correct answer?

4

A function to be called must be ended with a----------------

A. .

B. ?

C. ;

D. none of the above

What is the correct answer?

4

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

A. True

B. False

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

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

A. True

B. False

What is the correct answer?

4

Which of the following is the most preferred way of throwing and handling exceptions?

A. Throw by value and catch by reference.

B. Throw by reference and catch by reference.

C. Throw by value and catch by value

D. Throw the pointer value and provide catch for teh pointer type.