0% found this document useful (0 votes)
107 views1 page

2nd Year Chapter No.9 Computer

This document appears to be a practice exam for a Computer Science class assessing knowledge of basic C programming concepts through multiple choice and short answer questions. The multiple choice section covers unary and binary operators, comments, data types, arithmetic operators, operator precedence, and relational expressions. The short answer questions ask about variable initialization, keywords, variable declaration, arithmetic expressions, operator uses, and the output of various code snippets using operators. The long answer questions ask about data types, identifiers, and expressions.

Uploaded by

Musawar Raza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views1 page

2nd Year Chapter No.9 Computer

This document appears to be a practice exam for a Computer Science class assessing knowledge of basic C programming concepts through multiple choice and short answer questions. The multiple choice section covers unary and binary operators, comments, data types, arithmetic operators, operator precedence, and relational expressions. The short answer questions ask about variable initialization, keywords, variable declaration, arithmetic expressions, operator uses, and the output of various code snippets using operators. The long answer questions ask about data types, identifiers, and expressions.

Uploaded by

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

Syed Altaf College Massa Kota

Class: 2nd year Paper: Computer Science


TIME: 40 min Name: _______________

1. The logical not operator denoted by ! is a


(a) Unary Operator (b) binary operator (c) Ternary Operator (d) None
2. Comments are used to increase _____________ of the program.
(a) Visibility (b) Beauty (c) Readability (d) Complexity
3. Which term describes the kind of value that a variable can store.
(a) Data Type (b) Variable name (c) Variable type (d) Variable size
4. Which of the following is not arithmetic operator?
(a) + (b) / (c) % (d) >
5. Which operator has the lowest precedence?
(a) ! (b) + (c) = (d) ==
6. An expression that uses the relational operator is known as
(a) Operational (b) Sequence (c) Serial (d) Relational

SHORT QUESTIONS
1. What is variable initialization?
2. What do you know about the term “Keyword”. Discuss it with example?
3. What is variable declaration?
4. What is an Arithematic Expression?
5. What are the uses of operators?
6. What will be the output of the following code?
int a = 3 , b = 3, c;
c = a % b;
printf(“%d”, c);
7. What will be the output of the following code?
int a =9;
b = b % 2;
printf(“%d”, b);
8. What will be the output of the following code?
int number = 6;
int x = 0;
x = --number;
printf(“%d”,x);
9. What will be the output of the following code?
int a = 6;
a ++;
printf(“%d”, a);
10. What will be the output of the following code?
int a = 21;
a = a % 2;
printf(“%d”, a);

LONG QUESTIONS
1. What is a data type? Discuss Integer data type in details with types?
2. What is the identifier? Discuss two types of identifiers used in the C language.
3. What is expression? Discuss it in details?

You might also like