Class12_C_Programming_QA
Class12_C_Programming_QA
C is a general-purpose, procedural programming language developed in the early 1970s by Dennis Ritchie.
Features:
- Fast execution
- Structured programming
Advantages:
Disadvantages:
- No object-oriented features
- No runtime checking
3.) What is a Data type? Explain the type of data with examples.
Types:
Types:
- Local Variable
- Global Variable
- Static Variable
- External Variable
5.) What is an operator? Write its types and explain any four of them.
Types:
- Arithmetic (+, -, *, /, %)
6.) What is a control structure? Write a difference between break and continue statements with
examples.
Example:
for(i=0;i<5;i++) {
if(i==2) break;
for(i=0;i<5;i++) {
if(i==2) continue;
7.) What is looping? Write the difference between while and Do while loop with examples.
Example:
while(i<5){...}
do{...}while(i<5);
8.) Define the term array. What is the string? Explain any four-string handling function for example.
Functions:
Types:
- User-defined functions
Example:
if(n==1) return 1;
return n*fact(n-1);
11.) What is the concept of storage? Differentiate between automatic storage and external storage.
Example:
struct Student {
int id;
char name[20];
};
16.) Define the terms call by value and call by reference with examples.
Example:
int a = 5;
int *p = &a;
19.) Differentiate between sequential access and random access techniques of data file.