Home
Current Affairs January 2024

What is the correct answer?

4

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

A. True

B. False

Correct Answer :

A. True


Related Questions

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

Which of the following language is predecessor to C Programming Language?

A. A

B. B

C. BCPL

D. C++

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

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.

What is the correct answer?

4

Which of the STL containers store the elements contiguously (in adjecent memory locations)?

A. std::vector

B. std::list

C. std::map

D. std::set

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

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

perror( ) function used to ?

A. Work same as printf()

B. prints the error message specified by the compiler

C. prints the garbage value assigned by the compiler

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

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

The expression 'int j = 6 + 3 % -9;' evaluates to -1.

A. True

B. False

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

Operation between an integer and float always yields a float result.

A. True

B. False

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

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

Which classes allow primitive types to be accessed as objects?

A. Storage

B. Virtual

C. Friend

D. Wrapper

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 statement "for (i = 0, j = 2; j <= 10; j++)" is a valid statement in 'C'.

A. True

B. False

What is the correct answer?

4

Which of the following is not an infinite loop

A. int i =1;
while (1)
{i++;}

B. for( ; ; );

C. int true=0< false;
while (true)
{false = 1;}

D. int y, x = 0;
do
{y = x;}
while (x==0);

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

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

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

A. / + *

B. * / +

C. + / *

D. * / + -

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

The main() function can be called from any other 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 
#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

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

A. break

B. continue

C. exit

D. All of the above

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

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

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