BANGALORE INSTITUTE OF TECHNOLOGY
K. R. Road, V. Vv. Puram, Bengaluru- 560 004
Autonomous Institute, Affiliated to TU
Recognized by AICTE, New Delhi, India
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Subject: Programming in C Subject Code:1BEIT105
Module : 1
Question Bank
1. Explain the Structure of C program (general form)D with example.
2. Differentiate between Compiler and Interpreter.
3. Conceptualize memory map of a C program
4. Explain basic datatype and type modifiers
5. What is an identifier? What are the rules to construct identifiers? With example.
6. Define a variable. Explain how it is declared, defined and initialized with syntax and
example.
7. Explain various types of variables with respect to the position of variable declaration.
(types of variables)
8. Differentiate between local and global variables.
9. Explain various c scopes with example
10. Explain types of storage class specifiers with syntax and example.
11. List and explain various types of constants with example for each.
12. List and Explain all the operators used in C with example and mention its precedence.
13. Define precedence and associativity.
a) Evaluate the fallowing based on precedence and associativity
i. e=(a+b-c)*d/a a=2,b=2,c=3,d=4
ii. e=(d+c)/(c+b) a=1,b=2,c=3,d=4
iii. x=a*4+b/2-c*b; a=3,b=4,c=5
iv. y=--a*(3+b)/2-c++*b; a=3,b=4,c=5
14. Explain type conversion with example
15. Write a C program to find area of rectangle?
16. What are escape sequences? List the different escape sequences and explain.
17. Write a C Program to display the ASCII value of given character
18. Write a C program to swap two numbers without using temp variable.
19. A store provides a discount on purchases as follows:
If the purchase amount is greater than ₹5000, give a 10% discount. Otherwise, no discount.
Write a C program to calculate and display the final amount to be paid.
Hint:
Use the conditional (ternary) operator (?:) to make the decision in a single line.
20. A shopping mall uses a program to count the number of customers entering.
Each time a new customer enters, the counter should increase by 1.
Problem:
Write a C program that keeps track of the number of customers entering and leaving the
K. R. Road, V. Vv. Puram, Bengaluru- 560 004
Autonomous Institute, Affiliated to TU
Recognized by AICTE, New Delhi, India
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Subject: Programming in C Subject Code:1BEIT105
Module : 1
Question Bank
1. Explain the Structure of C program (general form)D with example.
2. Differentiate between Compiler and Interpreter.
3. Conceptualize memory map of a C program
4. Explain basic datatype and type modifiers
5. What is an identifier? What are the rules to construct identifiers? With example.
6. Define a variable. Explain how it is declared, defined and initialized with syntax and
example.
7. Explain various types of variables with respect to the position of variable declaration.
(types of variables)
8. Differentiate between local and global variables.
9. Explain various c scopes with example
10. Explain types of storage class specifiers with syntax and example.
11. List and explain various types of constants with example for each.
12. List and Explain all the operators used in C with example and mention its precedence.
13. Define precedence and associativity.
a) Evaluate the fallowing based on precedence and associativity
i. e=(a+b-c)*d/a a=2,b=2,c=3,d=4
ii. e=(d+c)/(c+b) a=1,b=2,c=3,d=4
iii. x=a*4+b/2-c*b; a=3,b=4,c=5
iv. y=--a*(3+b)/2-c++*b; a=3,b=4,c=5
14. Explain type conversion with example
15. Write a C program to find area of rectangle?
16. What are escape sequences? List the different escape sequences and explain.
17. Write a C Program to display the ASCII value of given character
18. Write a C program to swap two numbers without using temp variable.
19. A store provides a discount on purchases as follows:
If the purchase amount is greater than ₹5000, give a 10% discount. Otherwise, no discount.
Write a C program to calculate and display the final amount to be paid.
Hint:
Use the conditional (ternary) operator (?:) to make the decision in a single line.
20. A shopping mall uses a program to count the number of customers entering.
Each time a new customer enters, the counter should increase by 1.
Problem:
Write a C program that keeps track of the number of customers entering and leaving the