POP Assignment Questions-1
POP Assignment Questions-1
Assignment Questions
Introduction to C
10. Explain the structure of a C program with an example for each section.
11. Draw the flowchart for executing a C program.
OR
Explain the steps involved in compiling and executing a C program.
12. What is a token? Explain the different types of tokens available in C language?
13. Define constant. Explain in detail different types of constants available in C.
14. What are data types? Mention the different data types supported by C language, giving an
example to each.
15. Define variable & discuss the rules for naming a variable with suitable examples.
16. Explain the concept of variables & its declaration with an example.
17. Give the syntax for printf and scanf function. Explain with the help of a program?
OR
Explain the formatted I/O functions in C with an example?
Page 1
Module 2: Operators in C, Type Conversion and Type Casting
1. What is an Operator? List and explain various types of operators with example for each?
i. Arithmetic Operators
ii. Relational & Logical operators
iii. Assignment operators
iv. Increment & Decrement operators
v. Conditional (Ternary) operator
vi. Bitwise operators
vii. Special operators
OR
Explain different types of operators in c language.
2. In a company an employee is paid as: DA is 20% of Basic Salary and HRA is 10% of basic
Salary. If the employee's basic salary is input by the user, write a program to find his gross
salary.
3. Define the terms: precedence and associativity. Evaluate the following expressions based
on this concept:
a. 2*((i/3)+4*(j–2)) given i=8, j=5
b. a && b || c && ( !b ) where a=2 b=4 c=3
c. 22 + 3 < 6 && !5 || 22 = = 7 && 22 – 2 > +5
d. a + 2 > b || !c && a = = d * a – 2 < = e where a=11, b=6, c=0, d= 7 and e=5.
4. What is type conversion? Explain two types of conversions with suitable examples.
Page 2