Home
Current Affairs January 2024

What is the correct answer?

4

It is necessary to initialize the array at the time of declaration.

A. True

B. False

Correct Answer :

B. False


Related Questions

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

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

Which of the following is a valid destructor of the class name "Country"

A. int ~Country()

B. void Country()

C. int ~Country(Country obj)

D. void ~Country()

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

Which of the following is not a standard exception built in C++.

A. std::bad_creat

B. std::bad_alloc

C. std::bad_cast

D. std::bad_typeid

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

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

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

What is Keywords?

A. Keywords have some predefine meanings and these meanings can be changed.

B. Keywords have some unknown meanings and these meanings cannot be changed.

C. Keywords have some predefine meanings and these meanings cannot be changed.

D. None of the above

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

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

A. True

B. False

What is the correct answer?

4

&& and & operators have the same meaning.

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

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

How many times the following loop will execute?
for (a = 0; a < 4; a++)
printf("hello
");

A. 3

B. 4

C. 5

D. infinite

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

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

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

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

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

A continue statement causes execution to skip to

A. the return 0; statement

B. the first statement after the loop

C. the statement following the continue statement

D. the next iteration of the loop

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

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

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

A. delete

B. concatenate

C. compare

D. none of the above

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

A declaration float a, b; occupies ___ of memory

A. 1 byte

B. 4 bytes

C. 8 bytes

D. 16 bytes