0% found this document useful (0 votes)
14 views2 pages

CP - Cat 1 QB

The document contains multiple-choice questions (MCQs) and short answer questions related to the C programming language, covering topics such as keywords, variable names, operators, and constants. It includes questions about the functionality of specific operators, types of integers, and the rules for naming identifiers. Additionally, it provides a question bank for two units, focusing on operators, conditional statements, and type conversion in C.
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)
14 views2 pages

CP - Cat 1 QB

The document contains multiple-choice questions (MCQs) and short answer questions related to the C programming language, covering topics such as keywords, variable names, operators, and constants. It includes questions about the functionality of specific operators, types of integers, and the rules for naming identifiers. Additionally, it provides a question bank for two units, focusing on operators, conditional statements, and type conversion in C.
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/ 2

MCQ

1. How many keywords are there in C Language ?


1. 30 b) 22 c) 32 d) 36
2. Which of the following is true for variable names in C?
a) Variable names cannot start with a digit
b) Variable can be of any length
c) They can contain alphanumeric characters as well as special characters
d) Reserved Word can be used as variable name
3. Types of Integers are ______
e) Short b) Int c) Long d) All the above
4. What are the entities whose values can be changed called?
f) Constants b) Variables c) Modules d) Tokens
5. What does the modulus operator (%) do ?
a) Divide two numbers
b) Returns the remainder of a division operation
c) Multiplies two numbers
d) Subtract one number from another
6. Which operator is used for assignment in C?
a) = b) = = c) => d) <=
7. What does the ++ operator do in C when applied to a variable?
a) Decrease operand by 1
b) Increase operand by 1
c) Double the value of operand
d) None of the above
8. Which operator is used for modulus division in C?
a) % b) ? c) * d) &
9. All keywords in C are in ____________
a) Lower Case letters
b) Upper Case letters
c) Lower and Upper Case letters
d) None of the mentioned
10. Which of the following is not a valid C variable name?
a) int number;
b) float rate;
c) int variable_count;
d) int $main;
11. What is the result of logical or relational expression in C?
a) True or False
b) 0 or 1
c) 0 if an expression is false and any positive number if an expression is true
d) None of the mentioned
12. Which among the following is NOT a logical or relational operator?
a) != b ) == c) || d) =
Unit -1 Question Bank
1. Explain how to create and run the program
2. What is an operator? List and explain various types of operators
3. What is a token? What are the different types of tokens available in C language? Explain
4. What are variables how they are declared (04 marks)
5. Explain any five operators used in C language
6. Briefly explain how to create and run the program (04 marks)
7. What are identifiers? Discuss the rules to be followed while naming identifiers?
8. Give examples. (06 marks)
9. Explain the following constants with example (6M)
i) integer constant ii) floating constant iii) character constant.
10. Explain with example, the various constants available in ‘C’ program(5 Marks)
11. What are c tokens? Mention then? and explain any two tokens (08 marks)

Unit 2 Question Bank


1. List all the arithmetic operators in C. Explain any two of them with suitable example.
2. Write a program to illustrate the use of arithmetic operators?
3. What are the various conditional statements available in ‘C’? Explain with example.
4. What are the various conditional statements available in ‘C’? Explain with example.
[6M]
5. What is an operator? Explain Arithmetic, Relational and logical operators with
suitable example. [7M]
6. Write a program to illustrate the use of arithmetic operators?
7. Develop a C program to find the area of a circle? Explain the following operators with
examples
i) conditional ii) bitwise iii) size of (07 marks)
8. Explain the following operators with examples

i) Relational ii) conditional iii) increment iv) special (07 marks)

9. Define type conversion? Give the difference between ITC and ETC (05 Marks)
The process of converting the data from one data type to another data type is called
Type conversion.
ITC ETC
1. It is performed by Compiler. 1. It is performed by programmer.
2. ITC performs only lower to 2. ETC perform both lower to
higher data conversion higher and higher to lower
3. ITC is performs when both the 3. ETC is performed when both the
operands are of different type. operands are of same type.
4. Example 4. Example
5. 2+3.4=5.4 a. float a=10.6 b. (int)a;
5. Ans:10

You might also like