Question-101. Why C is called a mid level programming language ?
Answer- It supports the feature of both low-level and high level languages that is why it is known as a mid level programming language.
Question-102. Who is the founder of C language ?
Answer- Dennis Ritchie.
Question-103. When C langauge was developed ?
Answer- C language was developed in 1972 at bell laboratories of AT&T.
Question-104. What are the features of C language ?
Answer- The main features of C language are given below:
Simple Portable Mid Level Structured Fast Speed Memory Management Extensible
Question-105. What is the use of printf() and scanf() functions ?
Answer- The printf() function is used for output and scanf() function is used for input.
Question-106. What is the difference between local variable and global variable in C ?
Answer- Local variable: A variable which is declared inside function or block is known as local variable.
Global variable: A variable which is declared outside function or block is known as global variable.
int value=50;//global variable void function1(){ int x=20;//local variable }
Question-107. What is the use of static variable in C ?
Answer- A variable which is declared as static is known as static variable. The static variable retains its value between multiple function calls.
void function1(){ int x=10;//local variable static int y=10;//static variable x=x+1; y=y+1; printf("%d\n",x);//will always print 11 printf("%d\n",y);//will always increment value, it will print 11, 12, 13 and so on }
Question-108. What is the use of function in C ?
Answer- A function in C language provides modularity. It can be called many times. It saves code and we can reuse the same code many times.
Question-109. What is the difference between call by value and call by reference in C ?
Answer- We can pass value to function by one of the two ways: call by value or call by reference. In case of call by value, a copy of value is passed to the function, so original value is not modified. But in case of call by reference, an address of value of passed to the function, so original value is modified.
Question-110. What is recursion in C ?
Answer- Calling the same function, inside function is known as recursion. For example:
void function1(){ function1();//calling same function }