C Language Interview Question and Answers
1. |
What is C language? |
|
- C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972.
- The C programming language is a standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX operating system.
- It has since spread to many other operating systems, and is one of the most widely used programming languages.
|
|
Dharu Saravanan, says |
Sep 10, 2014 |
C is a programming language. By Dennis.M.Ritche in 1972 at AT&T Bell Laboratories. It is most commonly used programming languages.
|
Dharani, says |
Apr 30, 2014 |
C is a structured programming language. It was developed by Tennis M.Ritche at Bell labaouratry. It is a most commenly used programming language. It developed after the B language.
|
Kaushlesh shukla, says |
Apr 10, 2014 |
C is a high level programming language developed by Dennis ritchie in 1972 for for use on the UNIX operating system and creating system application. |
Vinoth Kumar, says |
Mar 30, 2014 |
C is a structured programming language. C is developed by Dennis ritchie. |
Sabbul, says |
Mar 14, 2014 |
C language is basically developed for creating system applications that direct interacts to the hardware devices such as drivers, kernals etc. It can be defined by following ways: Mother language System programming language Procedure oriented programming language Structured programming language Mid level programming language. |
Sabbul, said |
Mar 13,2014 |
C language is basically developed for creating system applications that direct interacts to the hardware devices such as drivers, kernals etc. It can be defined by following ways: Mother language System programming language Procedure-oriented programming language Structured programming language Mid level programming language. |
Geeta garg, says |
Feb 05,2014 |
C is a middle language which has some low level and some high level language features. C is developed by Dennis ritchie at AT Bell Laboratories of USA in 1972 for use on the UNIX operating system. |
Thaslim, says |
Feb 05,2014 |
C is a programming language developed in 1972 by Dennis ritchie and it is one of the most widely used programming languages.
|
|
2. |
What are the types of constants in c? |
|
C constants can ba divided into two categories : - Primary constants
- Secondary constants
|
|
Dharu Saravanan, said |
Sep 10, 2014 |
There are two constants they are Primary,Secondary constants.Primary are float,characters,real and double. Secondary are union,array,pointers and strutures.
|
Sambasivarao, said |
Mar 14, 2014 |
Primary constats are real, float and characters.
Secondary constants are array, union, enum, pointer,and structers. |
|
3. |
What are the types of C intructions? |
|
Now that we have written a few programs let us look at the instructions that we used in these programs. There are basically three types of instructions in C : - Type Declaration Instruction
- Arithmetic Instruction
- Control Instruction
|
|
Manoranjan, said |
Mar 14, 2014 |
Type Declaration instruction is used to declare the type of variables used in C. Any variable we want to use in the program must be declared before using it. This declaration is done using Type declaration instruction. This declaration is done at the beginning of the main() function.
Arithmetic instructions are used to perform arithmetic operations on variables and constants. Here we will learn some new terms. These are operands and operators. The variables and constants on which arithmetic operation is done by arithmetic operators are called operands.
Control instruction is used to control the sequence (flow) of the program. We write a program to perform a particular task. The program might be addition of two numbers, subtraction of two number or division of two numbers. Let us suppose that we need to write a program to perform all the above three operations i.e. addition, subtraction and multiplication. Writing three different programs is not feasible. If we do so, then for addition, subtraction and division we need to run the program separately. Instead of doing this, we can include decision control statement. Using this we can decide within the program whether to perform addition, subtraction or division. Thus program becomes efficient and user friendly too. Using decision control statement, we can perform different actions based on the circumstances. Decision control instructions: 1) The if statement 2) The if-else statement 3) The conditional operators 4) The switch statement.
|
|
4. |
What is a pointer? |
|
Pointers are variables which stores the address of another variable. That variable may be a scalar (including another pointer), or an aggregate (array or structure). The pointed-to object may be part of a larger object, such as a field of a structure or an element in an array. |
|
Sambasivarao, said |
Mar 14, 2014 |
Pointer variable is used to refer another variable of same type. The type may be structures and whatever or it may be enum type. |
Vikas kumar, said |
Feb 22, 2014 |
Pointer is a variable which store the address of another varible. |
|
5. |
What is the difference between arrays and pointers? |
|
Pointers are used to manipulate data using the address. Pointers use • operator to access the data pointed to by them. Arrays is a collection of similar datatype. Array use subscripted variables to access and manipulate data. Array variables can be Equivalently written using pointer expression. |
|
Anji, said |
Sep 10, 2014 |
Array : Array allocates space automatically. It can’t be resized it can’t be reassigned. size of(array name)gives the number of bytes occupied by the array.
Pointer : Explicitly assigned to point to an allocated space. It can be sized using realloc() 3-pointer can be reassigned. Size of pointer returns the number of bytes used to store the pointer variable p. |
|