C Developer

Given below are some of the important interview questions in C Programming asked by the interviewers. Checkout them if you are looking for a job as web development.

Q.1 What action to take to call an unmanaged function from managed code by using platform invoke services
Create a class to hold DLL functions and then create prototype methods by using managed code.
Q.2 What is accessibility modifier “protected internal”?
It is available to classes that are within the same assembly and derived from the specified base class.
Q.3 What is synchronization in reference to a thread?
In reference to a thread, synchronization is a process of handling situations when two or more threads need access to a shared resource.
Q.4 Which type of code security protects system resources from unauthorized calls?
Call-based security protects system resources from unauthorized calls.
Q.5 What does the keyword virtual mean in the method definition?
The keyword virtual mean that the method can be over-ridden.
Q.6 Why do we call C as the mother of all languages?
C is considered as the mother of all languages as it introduced many core concepts and data structures such as arrays, functions, lists, strings, etc. Also, many languages have been designed on the basis of C.
Q.7 What is a C Token?
C Token refers to the keywords, constants, strings, special symbols, operators and the identifiers used in C program.
Q.8 What is /0 character?
This symbol is known as a Null Character. It is a terminating character used in strings for notifying the end of the string to the compiler.
Q.9 Which datatype is used to store 32768 value?
We can use either float or long int to store 32768 value.
Q.10 What do you mean by dangling pointer variable in C Programming?
A pointer in C Programming is useful for pointing the memory location of an existing variable. If that particular variable is deleted and the Pointer is still pointing to the same memory location then that specific pointer variable is known as a Dangling Pointer Variable.
Q.11 What is the use of a static variable in C?
Static variables are used as the scope of the static variable is available in the whole program. Thus, we can access a static variable anywhere in the program. Moreover, it is initialized only once in the memory heap so as to reduce the memory usage.
Q.12 Why is C called a mid-level programming language?
C is known as a mid-level programming language as it binds the low level and high -level programming language. Hence, we can use C language as a system programming for developing the operating system along with an application programming to generate menu driven customer driven billing system.
Q.13 Explain modular programming.
Modular programming is the process of dividing the program in to sub programs in order to achieve the given task. More generic functions definition provide the ability to reuse the functions, like the built-in library functions.
Q.14 When is the "void" keyword used in a function?
The keyword void is a data type that represents literally no data at all. The most common use of this is a function that returns absolutely nothing.
Q.15 What is the explanation for prototype function in C?

Prototype function is basically a declaration of a function certain information to the compiler including -

  • Name of the function.
  • The return type
  • Parameters list
Q.16 What is the process to create increment and decrement statement in C?
The two possible methods of performing this task are the use of increment (++) and decrement (-) operator.
Q.17 Define a token?
A C program consists of various tokens. These tokens are either a keyword, an identifier, a string literal, a constant or a symbol.
Q.18 What is a self-referential structure?
A self-referential structure is the one including the same structure pointer variable as its element.
Q.19 What is the difference between ++a and a++?
‘++a” is called prefixed increment and hence, the increment happens first on a variable. On the other side, ‘a++’ is called postfix increment and the increment happens after the value of a variable used for the operations.
Q.20 Define keywords.
Keywords are the predefined words in C language, each of which is associated with specific features having a particular functionality.
Q.21 What is dynamic data structure?
A dynamic data structure is basically an organization or collection of data in memory that possesses the flexibility to grow or shrink in size and enable a programmer to control exactly how much memory is utilized.
Q.22 What is the declaration difference between the local variable and global variable in C?
A local variable is declared inside function or block whereas a global variable is declared outside the function or block.
Q.23 What is the use of printf() function?
The printf() function is useful for printing the integer, float, character and string values on to the screen.
Q.24 When was C language developed?
In the year 1972, C language was developed at bell laboratories of AT&T.
Q.25 What is Dynamic Memory allocation?
Dynamic Memory Allocation is basically the process of allocating memory to the program and its variables in runtime. This process involves three functions for the allocation of memory and one function to free the used memory.
Q.26 What is the main difference between the Compiler and the Interpreter?
The difference between the two is that a compiler is used in C Language to translate the complete code into the Machine Code in one shot. On the other hand, the Interpreter is used in Java Programming language and other high-end programming languages to compile code in line by line fashion.
Q.27 What is the difference between printf() and scanf() in C Program?
The printf() is used for printing values on the screen. On the other hand, scanf() is useful for scanning the values. Moreover, we require a proper datatype format specifier for the purpose of both printing and scanning.
Q.28 What is Preprocessor?
A Preprocessor Directive is a built-in predefined function or macro that behaves as a directive to the compiler and gets executed before the execution of the actual C program.
Q.29 What is an array?
An array is a simply a data structure that stores many elements of the same datatype in a reserved and sequential manner.
Q.30 Who is the founder of C language?
Dennis Ritchie founded the C language.
Q.31 What do you mean by a nested structure?
The structure is referred to as a nested structure when a data member of one structure is referred by the data member of another function.
Q.32 What are the features of the C language?
The significant features of C language are: 1. Simple 2. Mid-level 3. Portable 4. Fast Speed 5. Structured
Q.33 What are the types of arrays?

The three types of arrays are:

  • One Dimensional Array
  • Two Dimensional Array
  • Multi-Dimensional Array
Q.34 What is the use of the function in C?
C functions are used for avoiding rewriting of the same code again and again in a program. These functions can be called any number of times from any place of the program. Moreover, they provide the reusability concept, i.e., breaking the big task into smaller tasks so as to make the C program more understandable.
Q.35 Differentiate Source codes from Object codes.
The main difference between the Source Code and Object Code is that Source Code is a set of computer instructions written with a human-readable programming language whereas the Object Code is a sequence of statements in machine language, and is the output after the compiler converts the Source Code.
Q.36 Does a built-in header file contains built-in function definition?
No, the header file just declares the function. The definition is in library that is linked by the linker.
Q.37 Describe memory management in C language.
C offers an inbuilt memory function for saving the memory and enhances the efficiency of the program.
Q.38 What is the use of header files?
The header is used for importing the definitions to the source code using the #include directive.
Q.39 What are some operating systems developed by C language?
Operating systems like Microsoft's Windows, Apple's OS X, and Symbian have been developed with the use of C language.
Q.40 What is the description for syntax errors?
The errors that occur while making a program are known as syntax errors. For instance, misspelled commands, incorrect case commands, data type mismatches etc.
Q.41 Describe the difference between = and == symbols in C programming?
‘==’ is the comparison operator used for comparing the value or expression on the left-hand side with the value or expression on the right-hand side whereas ‘=’ is the assignment operator that is used for assigning the value of the right-hand side to the variable on the left-hand side.
Q.42 Describe Wild Pointers in C?
Uninitialized pointers in the C code are called Wild Pointers. They generally point to some arbitrary memory location and may cause bad program behavior or program crash.
Q.43 What are reserved words with a programming language?
Reserved words are a part of the standard C language library. These reserved words have special meaning and it is not possible to use them for any other activity than the functionality it is intended for.
Q.44 Describe static function with its usage?
A function having a function definition prefixed with a static keyword is known as a static function. The static function has to be called within the same source code.
Q.45 What are the basic data types associated with C?
  • Int
  • Float
  • Double
  • Char
  • Void
Q.46 What is typedef?
typedef is a C keyword that is used for defining synonyms for an existing type in C language. We usually use typedef's to simplify the existing type declaration syntax.
Q.47 What is the difference between variable declaration and variable definition?
Declaration is related to the type of variable whereas definition gives the value to the variable.
Q.48 How do we represent real numbers in C?
Real numbers are indicated in C by the floating point types such as float, double, and long double. As the integer types cannot represent all integers because they fit in a bounded number of bytes, similarly, the floating-point types cannot represent all real numbers.
Q.49 What is the difference between abs() and fabs() functions?
The difference between the two is that abs() is for integer values and fabs() is for floating type numbers. Moreover, both of them are to retrieve absolute value.
Q.50 Mention some of the applications of C?

1.Operating Systems

2.Embedded Systems


4.New Programming Platforms


Q.51 What is a floating point?
A floating-point constant is just a decimal number which represents a signed real number. The representation of a signed real number consists of an integer portion, a fractional portion as well as an exponent.
Q.52 What is the use of scanf function?
The scanf function enables us to accept the input from standard in, which is generally the keyboard. Moreover, the scanf function can do various things but can be unreliable as it does not handle human errors very well.
Q.53 What are the types of programming language?

There are different types of programming languages - 

1.Procedural Programming Language

2.Scripting Programming Language

3.Object-oriented Programming Language

4.Functional Programming Language

Q.54 What do you mean by storage classes?
Storage classes are used to define the scope and life-time of variables and functions within a C Program. They usually precede the type that they modify.
Get Govt. Certified Take Test