Chapter 8
Introduction To C Programming
Exercises
1. Fill in the blanks.
a. C is the only high-level programming language ……………. (TRUE/FALSE)
b. IDE stands for ………….
c. We always need a very powerful computer to run C programs……… (TRUE/FALSE)
d. Every statement in a C program has to end with …………….
e. Execution of a program starts from …………
2. Short answer questions (Answers should preferably be of 2-3 lines):
a. While writing a computer program, what does a programmer need to assume about the cpu and storage?
b. Do we always need Codeblock to write C programs? Explain.
c. Why do we need header files? Name a few standard header files in C.
3. Long answer questions (Answers should preferably be of 5-6 lines);
a. Explain the process of compilation of a C program. When we save a C program with the name Namaskar.c, what files will be created at each step of compilation?
b. Can we compile an erroneous code in C? If we do not write the function main() in our C program,
will it compile successfully?
c. What is a programmer’s view of memory? Is it different from actual memory? Explain briefly.
4. Programming assignments:
a. Write and execute a C program to print your name.
b. Write and execute a C program to print your name and your mother’s name in two different lines.
but using a single printf.
c. Write and execute a C program to print the sentence “I am from Assam. I am a responsible citizen of my country.” five times.
d. Remove the semicolons (;) from the C program of the previous question. Compile the program and
check the errors. Note the line numbers and then rectify them.
e. Write and execute a C program to print your name in the order Last name First name. But you will pass them in First name Last name order inside printf (Hint: use proper escape sequence].