C Language Interview Questions and Answers for Experienced - 1

Question: 1

What is the difference between exit() and return() in C?

exit() is a system call which terminates current process.

exit() is not an instruction of C language.

Whereas, return() is a C language instructions/statements and it returns from the current function (i.e. provides exit status to calling function and provides control back to the calling functions).

Question: 2

What is the difference between C and C++?

Even though C and C++ programming languages are belonging to middle level languages, both are differed in below.

C is structure/procedure oriented programming language whereas C++ is object oriented programming language.

C language program design is top down approach whereas C++ is using bottom up approach.

Polymorphism, virtual function, inheritance, Operator overloading, namespace concepts are not available in C programming language. Whereas C++ language supports all these concepts and features

C languages give importance to functions rather than data. Whereas C++ gives importance to data rather than functions

So, data and function mapping is difficult in C. But, data and function mapping is simple in C++ that can be done using objects.

C language does not support user define data types. Whereas C++ supports user define data types.

Exception handling is not present in C programming language. Whereas exception handling is present in C++ language

C language allows data to freely flow around the functions. But, data and functions are bound together in C++ which does not allow data to freely flow around the functions.

Question: 3

What is the difference between structured oriented, object oriented and non structure oriented programming language?

Structured oriented programming language:

In this type of language, large programs are divided into small programs called functions.

Prime focus is on functions and procedures that operate on data.

Data moves freely around the system from one function to another.

Program structure follows “Top down Approach”

Example: C, Pascal, ALGOL and Modula-2.

Object oriented programming language:

In this type of language, programs are divided into objects.

Prime focus is on the data that is being operated and not on the functions or procedures.

Data is hidden and cannot be accessed by external functions.

Program structure follows Bottom up Approach

Example: C++, Java and C#.

Non structure oriented programming language:

There is no specific structure for programming this language.

Example: BASIC, COBOL, FORTRAN

Question: 4

What are multidimensional arrays?

Multidimensional arrays are capable of storing data in a two or more dimensional structure.

Question: 5

Which level is C language belongings to?

C language is belonging to middle level language.

C language behaves as a bridge between machine level (low level) Languages and high level languages.

C language is more user friendly than machine level languages.

And, C language support does not support all the concepts that high level languages offer. So, C programming languages is called as middle level language.

Related Questions