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 • 97.10K Points
Coach

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

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

M

Mr. Dubey • 97.10K Points
Coach

Q. 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
Show Answer Discuss Share

M

Mr. Dubey • 97.10K Points
Coach

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

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

M

Mr. Dubey • 97.10K Points
Coach

Q. #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
Show Answer Discuss Share

M

Mr. Dubey • 97.10K Points
Coach

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

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

M

Mr. Dubey • 97.10K Points
Coach

Q. #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
Show Answer Discuss Share

M

Mr. Dubey • 97.10K Points
Coach

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

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

M

Mr. Dubey • 97.10K Points
Coach

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

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

M

Mr. Dubey • 97.10K Points
Coach

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

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

M

Mr. Dubey • 97.10K Points
Coach

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

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

Jump to

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.

Image