Home / Engineering / Programming for Problem Solving MCQs / Page 4

Programming for Problem Solving MCQs | Page - 4

Dear candidates you will find MCQ questions of Programming for Problem Solving here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.

M

Mr. Dubey • 51.17K Points
Coach

Q. 31) What is the following is invalid header file in C?

(A) math.h
(B) mathio.h
(C) string.h
(D) ctype.h
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 32) What is storage class for variable A in below code?
int main()
{
int A;
A = 10;
printf("%d", A);
return 0;
}

(A) extern
(B) auto
(C) register
(D) static
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 33) #include "stdio.h"
int main()
{
int a@ = 10;
printf("%d", a@);
return 0;
}

(A) 10
(B) 10@
(C) @
(D) [Error] stray '@' in program
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 34) #include "stdio.h"
int main()
{
int a = 10;
printf("%d", a);
int a = 20;
printf("%d",a);
return 0;
}

(A) 1020
(B) Error: Redeclartion of a
(C) 2020
(D) 1010
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 35) #include "stdio.h"
int a = 20;
int main()
{
int a = 10;
printf("%d", ::a);
return 0;
}

(A) 10
(B) 20
(C) ::20
(D) ::10
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 36) #include "stdio.h"
int main()
{
int a = 10, b = 20;
if(a=b)
{
printf("Easy");
}
else
{
printf("Hard");
}
return 0;
}

(A) Easy
(B) Hard
(C) EasyHard
(D) Error in program
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 37) Which gcc flag is used to enable all Compiler warnings?

(A) gcc -W
(B) gcc -w
(C) gcc -Wall
(D) gcc -wall
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 38) Which gcc flag is used to generate maximum debug information?

(A) gcc -g0
(B) gcc –g1
(C) gcc -g
(D) gcc –g3
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 39) Which macro is used to insert assembly code in C program (VC++ compiler)?

(A) __asm__
(B) _asm_
(C) __asm
(D) asm
View Answer Discuss Share

M

Mr. Dubey • 51.17K Points
Coach

Q. 40) Which macro is used to insert assembly code in C program (GCC compiler)?

(A) __asm__
(B) _asm_
(C) __asm
(D) asm
View Answer Discuss Share