C Programming Basic Set 1
Bachelor of Science in Computer Science FY (BSc CS),
Bachelor of Science in Computer Science SY (BSc CS),
Bachelor of Science in Computer Science TY (BSc CS),
Bachelor of Science in Information Technology FY (BSc IT),
Bachelor of Science in Information Technology SY (BSc IT),
Bachelor of Science in Animation FY (B.Sc animation),
Bachelor of Computer Applications (BCA),
Bachelor of Science in Information Technology (BSc IT),
Bachelor of Science in Computer Science (BSc CS),
On This Page
This set of C Programming Basic Multiple Choice Questions & Answers (MCQs) focuses on C Programming Basic Set 1
Q1 | Who is father of C Language?
- bjarne stroustrup
- dennis ritchie
- james a. gosling
- dr. e.f. codd
Q2 | C Language developed at _____?
- at & t\s bell laboratories of usa in 1972
- at & t\s bell laboratories of usa in 1970
- sun microsystems in 1973
- cambridge university in 1972
Q3 | For 16-bit compiler allowable range for integer constants is ______ ?
- -3.4e38 to 3.4e38
- -32767 to 32768
- -32768 to 32767
- -32668 to 32667
Q4 | C programs are converted into machine language with the help of
- an editor
- a compiler
- an operating system
- none of the above
Q5 | A C variable cannot start with
- an alphabet
- a number
- a special symbol other than underscore
- both (b) and (c)
Q6 | Which of the following is allowed in a C Arithmetic instruction
- []
- {}
- ()
- none of the above
Q7 | Which of the following shows the correct hierarchy of arithmetic operations in C
- / + * -
- * - / +
- + - / *
- * / + -
Q8 | What is an array?
- an array is a collection of variables that are of the dissimilar data type.
- an array is a collection of variables that are of the same data type.
- an array is not a collection of variables that are of the same data type.
- none of the above.
Q9 | What is right way to Initialization array?
- int num[6] = { 2, 4, 12, 5, 45, 5 } ;
- int n{} = { 2, 4, 12, 5, 45, 5 } ;
- int n{6} = { 2, 4, 12 } ;
- int n(6) = { 2, 4, 12, 5, 45, 5 } ;
Q10 | An array elements are always stored in _________ memory locations.
- sequential
- random
- sequential and random
- none of the above
Q11 | What is the right way to access value of structure variable book{ price, page }?
- printf("%d%d", book.price, book.page);
- printf("%d%d", price.book, page.book);
- printf("%d%d", price::book, page::book);
- printf("%d%d", price->book, page->book);
Q12 | perror( ) function used to ?
- work same as printf()
- prints the error message specified by the compiler
- prints the garbage value assigned by the compiler
- none of the above
Q13 | Bitwise operators can operate upon?
- double and chars
- floats and doubles
- ints and floats
- ints and chars
Q14 | What is C Tokens?
- the smallest individual units of c program
- the basic element recognized by the compiler
- the largest individual units of program
- a & b both
Q15 | What is Keywords?
- keywords have some predefine meanings and these meanings can be changed.
- keywords have some unknown meanings and these meanings cannot be changed.
- keywords have some predefine meanings and these meanings cannot be changed.
- none of the above
Q16 | What is constant?
- constants have fixed values that do not change during the execution of a program
- constants have fixed values that change during the execution of a program
- constants have unknown values that may be change during the execution of a program
- none of the above
Q17 | Which is the right way to declare constant in C?
- int constant var =10;
- int const var = 10;
- const int var = 10;
- b & c both
Q18 | Which operators are known as Ternary Operator?
- ::, ?
- ?, :
- ?, ;;
- none of the above
Q19 | In switch statement, each case instance value must be _______?
- constant
- variable
- special symbol
- none of the above
Q20 | What is the work of break keyword?
- halt execution of program
- restart execution of program
- exit from loop or switch statement
- none of the above
Q21 | What is function?
- function is a block of statements that perform some specific task.
- function is the fundamental modular unit. a function is usually designed to perform a specific task.
- function is a block of code that performs a specific task. it has a name and it is reusable
- all the above
Q22 | Which one of the following sentences is true ?
- the body of a while loop is executed at least once.
- the body of a do ... while loop is executed at least once.
- the body of a do ... while loop is executed zero or more times.
- a for loop can never be used in place of a while loop.
Q23 | A binary tree with 27 nodes has _______ null branches.
- 54
- 27
- 26
- none of the above
Q24 | Which one of the following is not a linear data structure?
- array
- binary tree
- queue
- stack
Q25 | Recursive functions are executed in a?
- first in first out order
- load balancing
- parallel fashion
- last in first out order