Top 100 C Campus / interview Questions

C Language Interview Questions set 2

Question: #11) What is C language?

Sol:

C is a mid-level and procedural programming language. The Procedural programming language is also known as the structured programming language is a technique in which large programs are broken down into smaller modules, and each module uses structured code. This technique minimizes error and misinterpretation.


Question: #12) Why is C known as a mother language?

Sol:

C is known as a mother language because most of the compilers and JVMs are written in C language. Most of the languages which are developed after C language has borrowed heavily from it like C++, Python, Rust, javascript, etc. It introduces new core concepts like arrays, functions, file handling which are used in these languages.


Question: #13) Why is C called a mid-level programming language?

Sol:

C is called a mid-level programming language because it binds the low level and high -level programming language. We can use C language as a System programming to develop the operating system as well as an Application programming to generate menu driven customer driven billing system.
[/showhide]

Question: #14) Who is the founder of C language?

Sol:

Dennis Ritchie.

Question: #15) When was C language developed?

Sol:

C language was developed in 1972 at bell laboratories of AT&T.

Question: #16) What are the features of the C language?

Sol:

The main features of C language are given below:

Simple: C is a simple language because it follows the structured approach, i.e., a program is broken into parts
Portable: C is highly portable means that once the program is written can be run on any machine with little or no modifications.
Mid Level: C is a mid-level programming language as it combines the low- level language with the features of the high-level language.
Structured: C is a structured language as the C program is broken into parts.
Fast Speed: C language is very fast as it uses a powerful set of data types and operators.
Memory Management: C provides an inbuilt memory function that saves the memory and improves the efficiency of our program.
Extensible: C is an extensible language as it can adopt new features in the future.


Question: #17) What is the use of printf() and scanf() functions?

Sol:

printf(): The printf() function is used to print the integer, character, float and string values on to the screen.

Following are the format specifier:

%d: It is a format specifier used to print an integer value.
%s: It is a format specifier used to print a string.
%c: It is a format specifier used to display a character value.
%f: It is a format specifier used to display a floating point value.
scanf(): The scanf() function is used to take input from the user.


Question: #18) What is the use of a static variable in C?

Sol:

Following are the uses of a static variable:

* A variable which is declared as static is known as a static variable.
* The static variable retains its value between multiple function calls.
* Static variables are used because the scope of the static variable is available in the entire program. So, we can access a static variable anywhere in the program.
* The static variable is initially initialized to zero.
* If we update the value of a variable, then the updated value is assigned.
* The static variable is used as a common value which is shared by all the methods.
* The static variable is initialized only once in the memory heap to reduce the memory usage.


Question: #19) What is the use of the function in C?

Sol:

Uses of C function are:

C functions are used to avoid the rewriting the same code again and again in our program.
C functions can be called any number of times from any place of our program.
When a program is divided into functions, then any part of our program can easily be tracked.
C functions provide the reusability concept, i.e., it breaks the big task into smaller tasks so that it makes the C program more understandable.


Question: #20) What is recursion in C?

Sol:

When a function calls itself, and this process is known as recursion. The function that calls itself is known as a recursive function.

Recursive function comes in two phases:

Winding phase / Direct recursion
Unwinding phase / Indirect recursion
Winding phase / Direct recursion : When the recursive function calls itself, and this phase ends when the condition is reached.

Unwinding phase / Indirect recursion : Unwinding phase starts when the condition is reached, and the control returns to the original call.

Python Basic Programming Tutorial

Python Introduction     Getting started in Python Programming      Python propgramming fundamentals     Python Operators    Python If Condition     Python for loop    Python range construct      Python While loop    break and continue statements     Different looping techniques     Python List     Python String     Python Functions    Python Inbuilt Functions     Python Recursion     Using Python Library     Python Tuples     Python Dictionary     Python Sets     Python Strings     Python Exception Handling     Python Data File Handling

Tutorials

Technical Questions and Important programs

Interview Questions

C Programming
C++ Programming
Basic Python Tutorial
Advanced Python Tutorial
C Language
C++ Programming
Python programming
C Important Programs
C Interview Questions
C++ Interview Questions
Python Interview Questions
HTML Interview Questions