Home
Current Affairs January 2024

What is the correct answer?

4

No commas or blanks are allowed within an integer or a real constant.

A. True

B. False

Correct Answer :

A. True


Related Questions

What is the correct answer?

4

printf() is not a library function.

A. True

B. False

What is the correct answer?

4

p++ executes faster than p + 1.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
main() 
{
int a = 5, b = 6;
(a == b? printf("%d", a));
}

A. 0

B. 5

C. Error

D. None of the above

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

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

A. True

B. False

What is the correct answer?

4

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

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

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

What would be the output of the following program?
int x=40;
main(){
int x=20;
printf("
%d",x);
}

A. 40

B. 20

C. Compilation Error

D. Garbeg Value

What is the correct answer?

4

If 'str' is a string of 7 characters, the statement printf("%4s", str); will display ------characters.

A. 4

B. 7

C. 6

D. 0

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

void' is a datatype.

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()
{
int z, a = 5, b = 3; z = a * 2 + 26 % 3;
printf("%d", z); }

A. 10

B. 0

C. 12

D. None of the above

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

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

A. True

B. False

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

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

A. True

B. False

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

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

Structures within structures cannot be created.

A. True

B. False

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

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

A. True

B. False

What is the correct answer?

4

C programming language was developed by

A. Dennis Ritchie

B. Ken Thompson

C. Bill Gates

D. Peter Norton

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

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

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

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

A. True

B. False

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