0% found this document useful (0 votes)
32 views6 pages

MCQ Chapter 1

Uploaded by

Bhagirath singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views6 pages

MCQ Chapter 1

Uploaded by

Bhagirath singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MCQs

1. What is the primary purpose of a flowchart?

a) To write code b) To visualize a process


c) To compile programs d) To debug software

2. Which of the following is a standard symbol in flowcharts?

a) Diamond b) Circle c) Triangle d) Square

3. In a flowchart, what does a diamond symbol represent?

a) Start/End b) Process c) Decision d) Input/Output

4. What is an algorithm?

a) A programming language b) A step-by-step procedure


c) A type of software d) A data structure

5. Which property is NOT associated with algorithms?

a) Finiteness b) Definiteness c) Randomness

d) Effectiveness

6. What does 'C' in C language stand for?

a) Code b) Compile c) Combination

d) It is not an acronym

7. Who developed the C programming language?

a) Dennis Ritchie b) Bjarne Stroustrup

c) James Gosling d) Guido van Rossum

8. Which of the following is NOT a basic structure of a C


program?

a) Header files b) Function definitions


c) Comments d) Flowcharts

9. What is the size of the int data type in C on a 32-bit system?

a) 1 byte b) 2 bytes c) 4 bytes d) 8 bytes

10. What is the correct way to declare an integer variable


in C?

a) int 1a; b) int a1; c) integer a1; d) a1 int;

11. What does type conversion refer to in C?

a) Changing variable names b) Changing data types


c) Changing function parameters d) Changing file formats

12. Which operator is used for multiplication in C?

a) * b) x c) . d) /

13. What is the purpose of the enum data type in C?

a) To define integer constants b) To perform arithmetic


operations
c) To declare arrays d) To input user data

14. Which of the following is used for output in C?

a) scanf() b) getch() c) printf() d) puts()

15. Which function is used to read a string in C?

a) scanf() b) gets() c) fputs() d) puts()

16. What is a flowchart's start symbol?

a) Rectangle b) Circle c) Diamond d) Ellipse

17. What is the output of printf("%d", 10 + 5);?

a) 10 b) 15 c) 105 d) Error
18. Which data type is used for single characters in C?

a) char b) int c) float d) double

19. What is the result of type casting in C?

a) It copies data b) It changes data type


c) It modifies variable names d) It deletes data

20. Which operator is used to compare two values in C?

a) = b) == c) != d) Both b and c

21. What symbol is used for comments in C?

a) // b) # c) /.../ d) Both a and c

22. Which flowchart symbol represents input/output


operations?

a) Rectangle b) Parallelogram c) Circle


d) Diamond

23. Which of the following is NOT a C standard library


function?

a) printf() b) scanf() c) open() d) strlen()

24. What is the default return type of the main function in


C?

a) void b) int c) char d) float

25. Which keyword is used to define a constant in C?

a) const b) final c) static d) define

26. What will the following code output? printf("%f",


5/2);

a) 2.0 b) 2.5 c) 2.00 d) Error


27. What does the term 'syntax' refer to in programming?

a) The meaning of code b) The structure of code


c) The efficiency of code d) The execution time

28. What is the purpose of the return statement in a


function?

a) To print output b) To end the function


c) To send back a value d) To declare variables

29. What is a common error when declaring variables in


C?

a) Using reserved keywords b) Not using a semicolon


c) Declaring without a type d) All of the above

30. What does the acronym ‘ASCII’ stand for?

a) American Standard Code for Information Interchange


b) Automated Standard Code for Information Interchange
c) American Syntax Code for Information Interchange
d) None of the above

31. What is the output of the expression 10 % 3 in C?

a) 1 b) 3 c) 10 d) 0

32. Which C library function is used to find the length of a


string?

a) strlen() b) size() c) length() d) count()

33. Which of the following cannot be a variable name in


C?

a) var1 b) 1var c) _var d)


var_name

34. What is the purpose of a header file in C?


a) To define variables b) To declare functions and macros
c) To include comments d) To write the main function

35. Which operator is used to perform logical AND


operation in C?

a) & b) && c) || d) |

36. What does the following code do? printf("%d", (1 + 2)


* 3);

a) Outputs 3 b) Outputs 9 c) Outputs 6


d) Outputs 12

37. What keyword is used to create a loop in C?

a) loop b) repeat c) while d) foreach

38. Which of the following is a valid comment in C?

a) // This is a comment b) /* This is a comment /


c) # This is a comment d) / This is a comment

39. What is the return type of the scanf() function?

a) void b) int c) char d) float

Fill in the Blanks

1. A flowchart starts with a ________ symbol.


2. The symbol for a process in a flowchart is a
………………...________.
3. An algorithm must be……………. to ensure it can be executed.
4. C language was developed in the ________ decade.
5. The first version of C was created at…………..Labs.
6. The main structure of a C program includes ________,
declarations, and functions.
7. The basic data types in C include int, char, float, and ________.
8. Type conversion in C can be either ________ or implicit.
9. The operator used for division in C is ________.
10. The keyword used to define a constant
is………….._______.
11. The output function in C is represented by …______.
12. The input function for reading formatted data is
_..............._______.
13. An enum in C is used to define a set of ________
constants.
14. The ________ operator checks if two values are not equal
in C.
15. C supports both ……………. and floating-point data
types.
16. The first line of a C program usually includes a ________
directive.
17. A loop that checks the condition at the end is called a
________ loop………………
18. The output of the expression 10 + 5 is ________.
19. A flowchart that ends with an output operation will use a
________ symbol…………..
20. The C programming language is often used for ________
programming.
21. A block of code that performs a specific task is called a
……………..________.
22. The function return type must be specified in the
……………..________.
23. The keyword………….._ is used to create a function in C.
24. A character constant is enclosed in ________.
25. The logical OR operator in C is represented by
………..________.
26. The first element of an array in C is accessed with the
index ________.
27. The ________ function is used to terminate a program in
C.
28. The ________ statement is used to include other files in C.
29. An algorithm must produce a ________ result for a given
input.
30. The standard output device in C is usually the ________

You might also like