You are on page 1of 3

Test-1

Day and Date : 16-10-2017, Monday


Q1. Explain history of C. Mention - when was it created, why was it created, by
whom was it created and where was it created.

Q2. What is an algorithm and also state its characteristics. What is a flowchart?
Explain different symbols used in drawing the flowchart.

Q3. Define what a program in C is.

Q4. Explain the general syntax of writing any program in C. (Preferably answer
this question after we end up with functions and pre-processor).

Q6. Say something about data types in C and also state its importance. For
built in data types specify its name, format specifier, size required for creating
a variable of its type and range of it.

Q7. Define what is a variable and constant in C. Where do we need to define a


variable in C?

Q8. Explain what we mean by keywords/reserve words in C with some


examples of it. Explain what we mean by identifier in C. Also state the rules for
constructing an identifier in C.

Q9. What is ASCII value in C.?

Q10. What is an escape sequence in C.?

Q11. What is a comment in C.?

Q12. What do we mean by typecasting? Explain implicit and explicit


typecasting with an example of it.

Q13. State the difference between float and double in C.

Q14. Explain what initialization is and what assignment is in C.

Q15. Define “precedence”, “associativity” and “arity” of an operator in C.


Q16. Explain the operator unary AND (&) in C.

Q17. Explain the increment operator in C (++). State the difference between
pre increment and post increment.

Q18. Explain what statement is and what an expression is in C. Also explain the
types of statements in C.

Q19. Explain the need of logical operators in C {logical AND (&&) and logical OR
(||)}. What do we mean by short circuit evaluation?

Q20. Explain the general syntax of writing an if-else statement in C.

Q21. Consider a “simple if” statement with a semicolon added to it at its end,
explain its execution. Consider an “if-else” statement with a semicolon added
to it (i.e. to if) at its end, explain its execution. For both the above cases
consider that the block ({and}) is present.

Q22. Explain with the general syntax – “Working of the ternary operator (?:) In
C.

Q23. Explain with the general syntax – “Working of “switch-case” in C. What is


fall through in switch? Can Label be repeated? Can we define a variable inside
switch? Can cases be written in any order? Can default be written at the start?
Is it compulsory to have break statement for default?

Q24. Explain the working of comma operator (,) in C.

Q25. What is pre tested and post tested loop in C. State examples of it.

Q26. Explain with general syntax the working of “for loop” in C. Are all the
three expressions optional in case of for? If middle expression is missing what
is it considered as? If a “for loop” is terminated with a semicolon (;) what do it
mean? What is “minimal for loop”?

Q27. Explain with general syntax the working of “while loop” in C. In case of
for-loop the middle expression is optional. If it is missing then it’s considered
as true. In the same way is the “condition/expression2” optional in case of
while loop? Explain what we mean by “while(1){ statement/s }”.
Q28. Explain with general syntax the working of “do-while loop” in C. In case of
for-loop the middle expression is optional. If it is missing then it’s considered
as true. In the same way is the “condition” optional in case of do-while loop?

Q29. What do we mean by “nesting of loops”? Explain “break” and “continue”


statement in C.

Q30. Define “Modularity”. State the benefits we achieve after implementing


modularity for completion of some task/job.

You might also like