Programming for Problem Solving Solved MCQs


Engineering interview questions,Mcqs,Objective Questions,Class Notes,Seminor topics,Lab Viva Pdf free download. CIVIL | Mechanical | CSE | EEE | ECE | IT | Chemical Online Quiz Tests for Freshers.
Home » Programming for Problem Solving Objective Questions » 300+ TOP Programming for Problem Solving MCQs with Answers
300+ TOP Programming for Problem Solving MCQs with Answers
Programming for problem solving multiple choice questions.
1. Which Of The Following Are Components Of Central Processing Unit(CPU)? A. Arithmetic Logic Unit, Mouse
B. Arithmetic Logic Unit, Control Unit
C. Arithmetic Logic Unit, Integrated Circuits
D. Control Unit, Monitor
Answer: B.Arithmetic Logic Unit, Control Unit
2. In Which Of The Following Form, Data Is Stored In Computer? A. Decimal
C. Hexadecimal
Answer: B.Binary
3. Which Level Language Is Assembly Language? A. High-Level Programming Language
B. Medium-Level Programming Language
C. Low-Level Programming Language
D. Machine Language
Answer: C.Low-Level Programming Language
4. 1 Mega Byte Is Equal To A. 1024 Bytes
B. 1024 Kilo Bytes
C. 1024 Giga Bits
D. 1024 Bits
Answer: B.1024 Kilo Bytes
5. One Byte Is Equal To How Many Bits ? A. 4 Bits
Answer: B.8 Bits
6. One Nibble Is Equal To How Many Bits ? A. 4 Bits
Answer: A.4 Bits
7. An Assembler Is Used To Translate A Program Written In ? A. Low-Level Language
B. Machine Language
C. Assembly Language
D. High-Level Language
Answer: C.Assembly Language
8. We Can Insert Pre Written Code In A C Program By Using A. #Read
C. #Include
Answer: C.#Include
9. Ritchie And Brian Kernighan Jointly Carried Out The Development Of C And That Version Is ________ . A. ISO C
B. K&R C
D. R&K C
Answer: B.K&R C
10. Who Was Creator Of B Language, Which Inspired Dennis Ritchie To Create Strong Procedural Language Called C? A. Thomas E. Kurtz
B. James Gosling
C. Brian Kernighan
D. Ken Thompson
Answer: D.Ken Thompson
11. Which Committee Standardize C Programming Language? A. W3C
Answer: B.ANSI
12. Dennis Was Author Of Famous Programming Book _________ . A. Thinking In C
B. C Programming For Scientist
C. The C Programming Language
D. C Programming And Techniques
Answer: C.The C Programming Language
13. Many Features Of C Were Derived From An Earlier Language Called _____. A. PASCAL
Answer: D.B
14. C Programming Was Created At ______ By Dennis Ritchie. A. AT&T Bell Laboratory
B. Stanford Lab
C. MIT University
D. Haward University
Answer: A.AT&T Bell Laboratory
15. Which Type Of Software Is An Operating System? A. Utility Software
B. System Software
C. Application Software
D. Firmware Software
Answer: B.System Software
16. Microsoft Office Is Type Of? A. Utility Software
Answer: C.Application Software
17. How Many Main() Function We Can Have In Our Project? A. 1
C. No Limit
D. Depends On Compiler
Answer: A.1
18. Is It Possible To Run Program Without Main() Function? A. Yes
Answer: A.Yes
19. What Is Sizeof() In C? A. Operator
B. Function
D. None Of These
Answer: A.Operator
20. Bitwise Operators Can Operate Upon? A. Double And Chars
B. Floats And Doubles
C. Int And Floats
D. Int And Chars
Answer: D.Int And Chars
21. 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
Answer: D.A & B Both
22. 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
Answer: C.Keywords Have Some Predefine Meanings And These Meanings Cannot Be Changed.
23. What Is Constant?A Constants Have Fixed Values That Do Not Change During The Execution Of A. Program
B. Constants Have Fixed Values That Change During The Execution Of A Program
C. Constants Have Unknown Values That May Be Change During The Execution Of A Program
Answer: A.Program
24. Which Is The Right Way To Declare Constant In C? A. Int Constant Var =10;
B. Int Const Var = 10;
C. Const Int Var = 10;
D. B & C Both
Answer: D.B & C Both
25. Which Operators Are Known As Ternary Operator? A. ::, ?.
Answer: B.?, :
26. Total Number Of Keywords In C Are A. 30
Answer: D.32
27. The Compiler In C Ignores All Text Till The End Of Line Using A. //
Answer: A.//
28. Printf() Belongs To Which Library Of C A. Stdlib.H
C. Stdout.H
D. Stdoutput.H
Answer: B.Stdio.H
29. What Is Correct Order Of Precedence In C A. Addition, Division, Modulus
B. Addition, Modulus, Division
C. Multiplication, Substration, Modulus
D. Modulus, Multiplication, Substration
Answer: D.Modulus, Multiplication, Substration
30. In Switch Statement, Each Case Instance Value Must Be _______? A. Constant
B. Variable
C. Special Symbol
Answer: A.Constant
31. What Is The Work Of Break Keyword? A. Halt Execution Of Program
B. Restart Execution Of Program
C. Exit From Loop Or Switch Statement
Answer: C.Exit From Loop Or Switch Statement
32. Which One Of The Following Sentences Is True ? A. The Body Of A While Loop Is Executed At Least Once.
B. The Body Of A Do … While Loop Is Executed At Least Once.
C. The Body Of A Do … While Loop Is Executed Zero Or More Times.
D. A For Loop Can Never Be Used In Place Of A While Loop.
Answer: B.The Body Of A Do … While Loop Is Executed At Least Once.
33. A C Variable Cannot Start With A. An Alphabet
B. A Number
C. A Special Symbol Other Than Underscore
D. Both (B) And (C)
Answer: D.Both (B) And (C)
34. Which Of The Following Shows The Correct Hierarchy Of Arithmetic Operations In C A. / + * –
B. * – / +
C. + – / *
D. * / + –
Answer: D.* / + –
35. Int Main() { Extern Int I; I = 20; Printf(“%D”, Sizeof(I)); Return 0; } A. 20
C. Undefined Reference To I
D. Linking Error
Answer: C.Undefined Reference To I
36. Is The Following Statement A Declaration Or DefinitionExtern Int I; A. Declaration
B. Definition
Answer: A.Declaration
37. Int Main() { Int X = 10; { Int X = 0; Printf(“%D”,X); } Return 0; } A. 10
B. Compilation Error
C. ‘0’
D. Undefined
Answer: C.’0′
38. //This Program Is Compiled On 32 Bit DEV-C++ Int Main() { Char *Ptr1, *Ptr2; Printf(“%D %D”, Sizeof(Ptr1), Sizeof(Ptr2)); Return 0; } A. 1 1
Answer: C.4 4
39. What Should Be The Output: Int Main() { Int A = 10/3; Printf(“%D”,A); Return 0; } A. 3.33
Answer: C.3
40. Which Of The Following Is Executed By Preprocess? A. #Include
B. Return 0
C. Void Main(Int Argc , Char ** Argv)
Answer: A.#Include
41. Int Main() { Int A = 10.5; Printf(“%D”,A); Return 0; } A. 10.5
D. Compilation Error
Answer: C.10
42. Int Main() { Int _ = 10; Int __ = 20; Int ___ = _ + __; Printf(“__%D”,___); Return 0; } A. Compilation Error
B. Runtime Error
Answer: D.__30
43. Int Main() { Int A = 5; Int B = 10; Int C = A+B; Printf(“%I”,C); A. 0
C. Undefined I
D. Any Other Compiler Error
Answer: B.15
44. int main() { int x; x=10,20,30; printf(“%d”,x); return 0; } A. 10
Answer: A.10
45. How many times C.com is printed? int main() { int a = 0; while(a++ < 5-++a) printf(“C.com”); return 0; } A. 5 times
Answer: D.1 times
46. How many times C.com is printed? int main() { int a = 0; while(a++ < 5) printf(“C.com”); return 0; } A. 5 times
Answer: A.5 times
47. How many times C.com is printed? int main() { int a = 0; while(a++) printf(“C.com”); return 0; } A. 1 time
C. Infinite times(Untill Stack is overflow)
Answer: B.0 time
48. How many times C.com is printed? int main() { int a = 0; while(++a) { printf(“C.com”); } return 0; } A. 1 time
B. Infinite Times(Untill Stack is overflow)
Answer: B.Infinite Times(Untill Stack is overflow)
49. What is output of below program? int main() { int i,j,count; count=0; for(i=0; i<5; i++); { for(j=0;j<5;j++); { count++; } } printf(“%d”,count); return 0; } A. 55
Answer: C.1
50. What is output of below program? int main() { int i,j,k,count; count=0; for(i=0;i<5;i++) { for(j=0;j<5;j++) { count++; } } printf(“%d”,count); return 0; } A. 5
Answer: C.25
51. What is output of below program? int main() { int i,j; for(i = 0,j=0;i<5;i++) { printf(“%d%d–“,i,j); } return 0; } A. 0–01–12–23–34–
B. 00–10–20–30–40–
C. Compilation Error
D. 00–01–02–03–04–
Answer: B.00–10–20–30–40– 52. What is output of below program? int main() { int i; for(i=0; i<5; ++i++) { printf(“Hello”); } return 0; } A. Hello is printed 5 times
C. Hello is printed 2 times
D. Hello is printed 3 times
Answer: B.Compilation Error 53. What is output of below program? int main() { for(; ;); for(; ;); printf(“Hello”); return 0; } A. Compilation Error
C. Nothing is printed
D. Hello is printed infinite times
Answer: C.Nothing is printed 54. What is the output of below program? int main() { for(; 😉 for(; 😉 printf(“Hello..”); return 0; } A. Compilation Error
C. Hello is printed one time
Answer: D.Hello is printed infinite times 55. How many loops are there in C A. 1
Answer: C.3 56. What is the following is invalid header file in C? A. math.h
B. mathio.h
C. string.h
Answer: B.mathio.h 57. What is storage class for variable A in below code? int main() { int A; A = 10; printf(“%d”, A); return 0; } A. extern
C. register
Answer: B.auto 58. #include “stdio.h” int main() { int [email protected] = 10; printf(“%d”, [email protected]); return 0; } A. 10
D. [Error] stray ‘@’ in program
Answer: D.[Error] stray ‘@’ in program 59. #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
Answer: B.Error: Redeclartion of a 60. #include “stdio.h” int a = 20; int main() { int a = 10; printf(“%d”, ::a); return 0; } A. 10
Answer: B.20 61. #include “stdio.h” int main() { int a = 10, b = 20; if(a=b) { printf(“Easy”); } else { printf(“Hard”); } return 0; } A. Easy
C. EasyHard
D. Error in program
Answer: A.Easy 62. Which gcc flag is used to enable all Compiler warnings? A. gcc -W
C. gcc -Wall
D. gcc -wall
Answer: C.gcc -Wall 63. Which gcc flag is used to generate maximum debug information? A. gcc -g0
Answer: D.gcc –g3 64. Which macro is used to insert assembly code in C program (VC++compiler)? A. __asm__
Answer: C.__asm 65. Which macro is used to insert assembly code in C program (GCCcompiler)? A. __asm__
Answer: A.__asm__ 66. Will compiler produce any compilation error if same header file isincluded two times? A. YES
Answer: B.NO 67. What should be the output of below program? #define # @ @include “stdio.h” int main() { printf(“C.com”); return 0; } A. C.com
D. Depends on Complier
Answer: C.Compilation Error 68. Which one of the following is invalid macro in C programming? A. #pragma
Answer: D.#elseif 69. What is the extension of output file produced by Preprocessor? A. .h
Answer: C..i 70. Set of consecutive memory locations is called as ________. A. Function
Answer: B.Array 71. Array can be considered as set of elements stored in consecutive memorylocations but having __________. A. Same Data Type
B. Same Scope
C. None of these
D. Different Data Type
Answer: A.Same Data Type 72. In Array, There is one to one correspondence between set of ________and set of values. A. Indices
B. Variables
C. Constants
D. Memory Locations
Answer: A.Indices 73. Smallest element of an array is called as _______. A. Middle Bound
C. Upper Bound
D. Lower Bound
Answer: D.Lower Bound 74. If we have declared an array described below – int arr[6]; then which of the following array element is considered as last array element ? A. arr[6]
Answer: D.arr[5] 75. Array which is having ____ dimensions is called as 2-D array. A. 3
Answer: B.2
76. What is maximum dimension that array can have in c programming? A. 2
C. Theoretically No Limit but practically limit depends on memory
Answer: C.Theoretically No Limit but practically limit depends on memory 77. Array with last element ‘n’ will always have array size equal to _______. A. n+1
Answer: A.n+1 78. Array is an example of _______ type memory allocation. A. Compile Time
B. Run Time
Answer: A.Compile Time 79. Array is ______ data type in C Programming language. A. Custom Data Type
B. Primitive Data Type
D. Derived Data Type
Answer: D.Derived Data Type 80. A Pointer to a block of memory is considered same as an array. A. NO
Answer: B.YES 81. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array? A. The element will be set to 0.
B. The compiler would report an error.
C. The array size would appropriately grow.
D. The program may crash if some important data gets overwritten.
Answer: D.The program may crash if some important data gets overwritten. 82. If you pass an array as an argument to a function, what actually gets passed? A. Base address of the array
B. Value of elements in array
C. First element of the array
D. Address of the last element of array
Answer: A.Base address of the array 83. Pointer is special kind of variable which is used to store __________ of the variable. A. Address
C. Variable Name
D. Data Type
Answer: A.Address 84. Pointer variable is declared using preceding _________ sign. A. ^
Answer: B.* 85. Address stored in the pointer variable is of type __________. A. Integer
C. Floating
D. Character
Answer: A.Integer 86. Consider the 32 bit compiler. We need to store address of integer variable to integer pointer. What will be the size of integer pointer? A. 10 Bytes
Answer: C.2 Bytes 87. In order to fetch the address of the variable we write preceding _________ sign before variable name. A. Asteriks
D. Ampersand
Answer: D.Ampersand 88. 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 }
Answer: A.int num[6] = { 2, 4, 12, 5, 45, 5 } ; 89. 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 –>
Answer: A.printf(“%d%d”, book.price, book.page); 90. What is true about fputs function A. write to a file
B. takes two parameters
C. requires a file pointer
D. all of above
Answer: D.all of above 91. Wild pointer in C A. if pointer is pointing to a memory location from where variable has been deleted
B. if pointer has not been initialized
C. if pointer has not defined properly
D. if pointer pointing to more than one variable
Answer: B.if pointer has not been initialized 92. Any type of modification on the parameter inside the function will reflect in actual variable value can be related to.. A. call by value
B. call by reference
C. both of above
D. none of above
Answer: B.call by reference 93. Size of void pointer is A. 1 byte
Answer: B.2 byte 94. To print a single character in ouptut,which function is used? A. getchar()
C. putchar()
Answer: C.putchar() 95. #define t 10 void main() { printf(“%d”,t); } A. 10
B. Error:Unfined symbol ‘t’
C. Error:Improper placement of preprocessor
D. none of the above
Answer: A.10 96. Explicit data type conversion is called A. Type casting
B. conversion
C. separation
Answer: A.Type casting 97. which of these is not a valid character constant A. “A”
Answer: A.“A” 98. If ‘a’ is the integer which is not statically initialized then what is the value of ‘a’? A. zero
C. none of these
Answer: B.garbage 99. C is a ____________________ language A. Platform independent programming
B. Platform dependent programming
C. Object oriented programming
D. None of the above.
Answer: B.Platform dependent programming 100. In a function call, _____________ is passed as arguments. A. variables
B. constants
C. Expressions
D. All the above
Answer: D.All the above
101. () is used for _________ A. function body
B. Arguments
C. Return type
D. Declaration of function
Answer: B.Arguments 102. which is better memory allocation when size is not known A. static
Answer: B.dynamic
103. which of the following is the best for getting a string with space from thestandard input A. gets
Answer: C.fgets
104. Which statement is used to compare the two strings? A. strcmp
B. strcompare
C. stringcompare
Answer: A.strcmp
105. void main() { printf(); } A. Run-Time Error
B. Compile-Time Error
Answer: B.Compile-Time Error
Programming for Problem Solving objective questions with answers pdf download online exam test
---- >> below are the related posts of above questions :::.
- 300+ TOP C Programming MCQ Questions and Answers
- 300+ TOP D Programming Language Interview Questions & Answers
- 300+ TOP GO PROGRAMMING Interview Questions and Answers
- 250+ TOP MCQs on Catalan Number using Dynamic Programming
- 70 TOP C PROGRAMMING UNIT WISE Important Questions and Answers
- 250+ TOP MCQs on Recursion and Answers
- 250+ TOP MCQs on C++ Concepts – 2 and Answers
- 250+ TOP MCQs on Scope of a Variable and Answers
- 250+ TOP MCQs on Pointers to Functions and Answers
- 2014-2015 : TCS (Tata Consultancy Services) Placement Paper Questions and Anwers
- 250+ TOP MCQs on Pointer to Function and Answers
- 300+ [REAL TIME] Euphoria Programming Language Interview Questions
- 300+ TOP ASSEMBLY LANGUAGE PROGRAMMING Objective Questions and Answers
- 200+ [UPDATED] C MCQs Pdf Download
- C++ Programming Questions and Answers – Integer Types and Answers
- 250+ TOP MCQs on Pointers Vs. Multi-dimensional Arrays and Answers
- 250+ TOP MCQs on Fibonacci using Dynamic Programming and Answers
- 250+ TOP MCQs on Character Pointers and Functions and Answers
- 15 Days Learn Go (programming language) Tutorial for Freshers [Free Pdf]
- 250+ TOP MCQs on Object Oriented Programming Terminology and Answers
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Programming For Problem Solving MCQs
Uploaded by, document information, original title, available formats, share this document, share or embed document, sharing options.
- Share on Facebook, opens a new window Facebook
- Share on Twitter, opens a new window Twitter
- Share on LinkedIn, opens a new window LinkedIn
- Share with Email, opens mail client Email
- Copy Link Copy Link
Did you find this document useful?
Is this content inappropriate, original title:, reward your curiosity.

- Share on Facebook, opens a new window
- Share on Twitter, opens a new window
- Share on LinkedIn, opens a new window
- Share with Email, opens mail client
C Programming Objective Questions and Answers Pdf - 1
- computer-quiz
- computer introduction
Question: 1
_____ is a picture in which the flows of computational paths are depicted.
(A) Algorithm
(B) Program
(D) Flow chart
Question: 2
Among unary operation which operator represents increment?
Question: 3
The function scanf is used to ___
(A) To take logical decisions
(B) Input a set of values
(C) Print a set of values
(D) Do mathematical manipulations
Input a set of values
Question: 4
If the function returns no value then it is called ____
(A) Data type function
(B) Calling function
(C) Main function
(D) Void function
Void function
Question: 5
A function _____
(A) May or may not need input data
(B) May or may not return a value
(C) Both a and b
(D) None of these
Both a and b
Error Report!
- software mcq
- Top 300+ C Programming Multiple Choice Questions & Answers
- C Programming Question Bank
- C Programming Objective Questions and Answers Pdf
- C Programming Quiz Questions and Answers
- C MCQs Questions with Answers Pdf 2019-2020
- C Programming Online Test Questions and Answers
- Online C Programming Test with Certificate
- Object Oriented Programming in C++ MCQ with Answers Pdf

REGISTER TO GET FREE UPDATES
2023 © MeritNotes

Programming for Problem Solving MCQs with Answers
1) Which Of The Following Are Components Of Central Processing Unit (CPU)? A) Arithmetic Logic Unit, Mouse B)Arithmetic Logic Unit, Control Unit C)Arithmetic Logic Unit, Integrated Circuits D) Control Unit, Monitor Ans. B)
2) In Which Of The Following Form, Data Is Stored In Computer? A) Decimal B) Binary C) Hexadecimal D) Octal Ans. B)
3) Which Level Language Is Assembly Language? A) High-Level Programming Language B) Medium-Level Programming Language C) Low-Level Programming Language D) Machine Language Ans. C)
4) 1 Mega Byte Is Equal To A) 1024 Bytes B) 1024 Kilo Bytes C) 1024 Giga Bits D) 1024 Bits Ans. B)
5) One Byte Is Equal To How Many Bits ? A) 4 Bits B) 8 Bits C) 12 Bits D) 16 Bits Ans. B)
6) One Nibble Is Equal To How Many Bits ? A)4 Bits B) 8 Bits C) 12 Bits
D) 16 Bits Ans. A)
7) An Assembler Is Used To Translate A Program Written In ? A) Low-Level Language B) Machine Language C) Assembly Language D) High-Level Language Ans. C)
8) We Can Insert Pre Written Code In A C Program By Using A) #Read B) #Get C) #Include D) #Put Ans. C)
9) Ritchie And Brian Kernighan Jointly Carried Out The Development Of C And That Version Is ________ . A) ISO C B) K&R C C) ANSI C D) R&K C Ans. B)
10) Who Was Creator Of B Language, Which Inspired Dennis Ritchie To Create Strong Procedural Language Called C? A) Thomas E. Kurtz B) James Gosling C) Brian Kernighan D) Ken Thompson Ans. D)
11) Which Committee Standardize C Programming Language? A) W3C B) ANSI C) ISO D) TRAI Ans. B)
12) Dennis Was Author Of Famous Programming Book _________ . A) Thinking In C B) C Programming For Scientist C) The C Programming Language D) C Programming And Techniques Ans. C)
13) Many Features Of C Were Derived From An Earlier Language Called _____. A) PASCAL B) BASIC C) FORTRAN D) B Ans. D)
14) C Programming Was Created At ______ By Dennis Ritchie. A) AT&T Bell Laboratory B) Stanford Lab C) MIT University D) Haward University Ans. A)
15) Which Type Of Software Is An Operating System? A) Utility Software B) System Software C) Application Software D) Firmware Software Ans. B)
16) Microsoft Office Is Type Of? A) Utility Software B) System Software C) Application Software D) Firmware Software Ans. C)
17) How Many Main() Function We Can Have In Our Project? A) 1 B) 2 C) No Limit D) Depends On Compiler Ans. A)
18) Is It Possible To Run Program Without Main() Function? A) Yes B) No C) Option. D) Option. Ans. A)
19) What Is Sizeof() In C? A) Operator B) Function C) Macro D) None Of These Ans. A)
20) Bitwise Operators Can Operate Upon? A) Double And Chars B) Floats And Doubles C) Int And Floats D) Int And Chars Ans. D)
21) 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 Ans. D)
22) 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 Ans. C)
23) What Is Constant? A) Constants Have Fixed Values That Do Not Change During The Execution Of A Program B) Constants Have Fixed Values That Change During The Execution Of A Program C) Constants Have Unknown Values That May Be Change During The Execution Of A Program D) Option. Ans. A)
24) Which Is The Right Way To Declare Constant In C? A) Int Constant Var =10; B) Int Const Var = 10; C) Const Int Var = 10; D) B & C Both Ans. D)
25) Which Operators Are Known As Ternary Operator? A) ::, ?. B) ?, : C) ?, ;; D) None Of The Above Ans. B)
26) Total Number Of Keywords In C Are A) 30 B) 12 C) 34 D) 32 Ans. D)
27) The Compiler In C Ignores All Text Till The End Of Line Using A) // B) / C) */
D) /*/ Ans. A)
28) Printf() Belongs To Which Library Of C A) Stdlib.H B) Stdio.H C) Stdout.H D) Stdoutput.H Ans. B)
29) What Is Correct Order Of Precedence In C A) Addition, Division, Modulus B) Addition, Modulus, Division C) Multiplication, Substration, Modulus D) Modulus, Multiplication, Substration Ans. D)
30) In Switch Statement, Each Case Instance Value Must Be _______? A) Constant B) Variable C) Special Symbol D) None Of The Above Ans. A)
31) What Is The Work Of Break Keyword? A) Halt Execution Of Program B) Restart Execution Of Program C) Exit From Loop Or Switch Statement Ans. C)
32) Which One Of The Following Sentences Is True ? A) The Body Of A While Loop Is Executed At Least Once. B) The Body Of A Do … While Loop Is Executed At Least Once. C) The Body Of A Do … While Loop Is Executed Zero Or More Times. D) A For Loop Can Never Be Used In Place Of A While Loop. Ans. B)
33) A C Variable Cannot Start With A) An Alphabet B) A Number
C) A Special Symbol Other Than Underscore D) Both (B) And (C) Ans. D)
34) Which Of The Following Shows The Correct Hierarchy Of Arithmetic Operations In C A) / + * – B) * – / + C) + – / * D) * / + – Ans. D)
35) Int Main() { Extern Int I; I = 20; Printf(“%D”, Sizeof(I)); Return 0; } A) 20B0 C) Undefined Reference To I D) Linking Error Ans. C) Note :- Extern Int I; Tell The Compiler That Int I Is Declared In Some Other File, In This Code We Have Not Included Any Other Header File So It Will Cause Compilation Error.
36) Is The Following Statement A Declaration Or DefinitionExtern Int I; A) Declaration B) Definition Ans. A)
37) Int Main() { Int X = 10; { Int X = 0; Printf(“%D”,X); } Return 0; } A 10 B Compilation Error C 0 D Undefined Ans. C
38 //This Program Is Compiled On 32 Bit DEV-C++ Int Main() { Char *Ptr1, *Ptr2; Printf(“%D %D”, Sizeof(Ptr1), Sizeof(Ptr2));
Return 0; } A 1 1 B 2 2 C 4 4 Ans. C
39 What Should Be The Output: Int Main() { Int A = 10/3; Printf(“%D”,A);
Return 0; } A 3.33 B 3.0 C 3 D Option. Ans. C
Note :- Integer Division (Int/ Int) Is Int Only Hence Instead Of Printing 3.33 It Will Print 3 Only. Float Part Is Discarded In Such Cases.
40 Which Of The Following Is Executed By Preprocess? A #Include<Stdio.H> B Return 0 C Void Main(Int Argc , Char ** Argv) Ans. A
41 Int Main() { Int A = 10.5; Printf(“%D”,A); Return 0; } A 10.5 B 10.0 C 10 D Compilation Error Ans. C Note :- Compiler Will Convert Float Values To Integer Value After Seeing %D So Instead Of Printing 10.5 It Will Print It Integer Value I.E 10
42 Int Main() { Int _ = 10; Int __ = 20; Int ___ = _ + __; Printf(“__%D”,___); Return 0; } A Compilation Error B Runtime Error C __0 D __30 Ans. D Note :- Multiple Underscore Ie. _ Can Be Used To Create Variables.
43 Int Main() { Int A = 5; Int B = 10; Int C = A+B; Printf(“%I”,C); A 0 B 15 C Undefined I D Any Other Compiler Error Ans. B Note :- %I Is Also Used To Printf Numeric Values In C. %D And %I Both Solve The Same Purpose.
44 int main() { int x; x=10,20,30; printf(“%d”,x); return 0; } A 10 B 20 C 30 D Compilation Error Ans. A Note :- When there are multiple , then assignment takes place from right to left hence 10 is the last value which is assign to x variable.
45 How many times C.com is printed? int main() { int a = 0; while(a++ < 5-++a) printf(“C.com”); return 0; } A 5 times
B 4 times C 3 times D 1 times Ans. D
46 How many times C.com is printed?
int main() { int a = 0; while(a++ < 5) printf(“C.com”); return 0; } A 5 times B 4 times C 3 times D 1 times Ans. A Note :- Here while loop is execrated for a = 0 to a = 4 which is 5 times execution hence C.com is printed 5 times.
47 How many times C.com is printed? int main() { int a = 0; while(a++) printf(“C.com”);
return 0; } A 1 time B 0 time C Infinite times(Untill Stack is overflow) D 2 times Ans. B Note :- Here while loop is evaluated as while(0) which means it will be executed 0 times and since printf is also part of it so nothing would be printed.
Note:- if there are no { } braces after any loop then only the next statement is considered as a part of the loop.
48 How many times C.com is printed? int main() { int a = 0; while(++a) { printf(“C.com”); }
return 0; } A 1 time B Infinite Times(Untill Stack is overflow) C 2 times D Error Ans. B Note :- Here while loop is evaluated as while(1) which means it will run infinite times.
49 What is output of below program? int main() { int i,j,count; count=0; for(i=0; i<5; i++); { for(j=0;j<5;j++); { count++; } } printf(“%d”,count); return 0; } A 55
B 54 C 1 D 0 Ans. C Note :- if we put ; after for() then for loop doesn’t run anything which is inside {}
50 What is output of below program? int main() { int i,j,k,count; count=0; for(i=0;i<5;i++) { for(j=0;j<5;j++) { count++; } } printf(“%d”,count); return 0; } A 5 B 10 C 25 D 50 Ans. C Note :- This code has 25 iterations of for loops that is why count++ is executed 25 times hence its value becomes 25.
Pharmacognosy (Part:-6) MCQs with answers
Properties of fluids mcqs with answers.
Fenee Patel

Programming MCQ (Multiple Choice Questions)

Our Programming Questions and Answers prepares an individual for competitive exams, entrance exams, various tests and interviews. Questions have detailed problem descriptions and solutions with detailed explanations so that one can understand them easily. One should spend 1 hour daily for 5-6 months to learn and assimilate various Programming subjects comprehensively. Here’s the benefits of our completely solved Programming questions and answers:
1. Programming Questions and Answers – Interview Preparations
One can practice these Programming interview questions and answer regularly to prepare for campus/off-campus interviews, pool-campus interviews, walk-in interviews and various company interviews in Programming topics. These fully solved interview questions are applicable to all – be it college students, freshers or experienced people. They can enhance their knowledge by regular practice which will help them crack any technical interview easily, thereby ensuring a good placement and career growth.
2. Programming Questions and Answers – Entrance & Competitive Exams
One can practice these Programming questions and answer regularly to prepare for various competitive & entrance exams as well as various tests & contests in colleges. Aspiring students and working professionals can learn and practice our fully solved Programming questions along with examples and detailed explanations in various subjects. Here’s a partial list of entrance exam and/or competitive exams for which one can practice these Programming questions: GATE, GRE, IAS, IES, PSC, UGC NET, DOEACC Exams and many others online/Offline Tests/Contests. One can also practice these questions for Department Tests/Exams for UG/PG courses, Credit scores and PhD Qualifier in US Universities .
3. Programming Multiple Choice Questions – Quiz Questions
Get Started – Programming Multiple Choice Questions & Answers:
Wish you the best in your endeavor to learn and master Programming!
- Aerospace Engineering MCQ PDF Download
- Metallurgical Engineering MCQ PDF Download
- Aeronautical Engineering MCQ PDF Download
- Mining Engineering MCQ PDF Download
- R Programming MCQ PDF Download
- Marine Engineering MCQ Questions
- Information Technology MCQ Questions
- Computer Science MCQ Questions
- LISP MCQ Questions
- Instrumentation Engineering MCQ Questions


IMAGES
VIDEO
COMMENTS
Solved MCQs for Programming for Problem Solving, With PDF download and FREE Mock test.
Programming for Problem Solving Multiple Choice Questions · 1. Which Of The Following Are Components Of Central Processing Unit(CPU)? · 2. In Which Of The
PROGRAMMING FOR PROBLEM SOLVING. Unit 1. Multiple Choice questions MCQ. Who is father of C Language? [CLO 1] [PLO1] A. Bjarne Stroustrup
Programming for Problem Solving MCQs - Free download as PDF File (.pdf), Text File (.txt) or read online for free.
GATE Problem Solving MCQ, Quiz, Objective Type, Multiple Choice, Online Test, Question Bank, Mock Test Questions and Answers Pdf Free Download for various
C Programming Mcq Online Test. Gate entrance exams C language model questions and answers pdf free download for freshers and experienced tutorials ebooks
Programming for Problem Solving MCQs with Answers ... 1) Which Of The Following Are Components Of Central Processing Unit (CPU)? ... 2) In Which Of
These Programming MCQs cover Programming, Coding, Problem Solving, ... looking to download Programming multiple Choice Questions, MCQs, Quiz, PDF files or
Get Problem Solving Multiple Choice Questions (MCQ Quiz) with answers and detailed solutions. Download these Free Problem Solving MCQ Quiz
View UNIT 1 2 3 4 5 QB UP.pdf from COMPUTER S CJ250 at Srm Institute Of Science & Technology. PROGRAMMING FOR PROBLEM SOLVING Unit 1 Multiple Choice