Thursday, 6 February 2014

C Interview Questions and Answers - 2

See the Complete C tutorial Here

21) What is a keyword?
Keywords are those words of C which have predefined meaning assigned by the C language. They form a part of the database required by the C compiler.

22) What are the different types of c instructions?There are basically three types of instructions in C are :
Type Declaration Instruction
Arithmetic Instruction
Control Instruction

23) What is an expression?Expression is defined as a combination of operands and operators to obtain some computation. Operands represent variables or values and The operator tells is what operation to be performed.

24) What are the types of data files?There are two types of data files :
stream oriented or standard data files
system oriented or low level data files

25) Why C is called a middle level language?C combines the features of both Assembly Level Languages (Low Level Languages) and Higher Level Languages. For this reason, C is referred to as a Middle Level Language. The feature of ALLs is that of enabling us to develop system level programs and the features of HLLs are those of higher degree of readability and machine independence.

26) How can variables be characterized?
The variables can be categorized by storage class as well as by data type. The storage class specifies the portion of the program within which the variables are recognized.

27) Give the rules for variable declaration?The rules for variable declaration in C are given below :
A variable name consists of alphabets, digits and the underscore (_) character
The length of variable should be kept upto 8 characters though your system may allow upto 40 characters
They must begin with an alphabet
Some systems also recognize an underscore as the first character
White space and commas are not allowed
Any reserved word (keyword) cannot be used as a variable name.

28) What is the purpose of type declarations?
The type declaration allow to create a synonym for other data types. Its syntax is typedef type identifier; The declaration typedef unsigned long int INTEGER

29) What is recursion?
C language a function may call another function. When a function calls itself, it is referred to as recursive call and the process is known as recursion. C provides very good facilities for recursion.

30) What is data types?
Data types refer to the classes of data that can be manipulated by C programs. The three fundamental data types supported by C are character, integer and real type.

31) What are the types of macro formats?There are two types of macro formats. There are

32) What are the different types of errors?Compile–Time Errors
Linker Errors
Runtime Errors
Logical Errors

33) What is meant by errors and debugging?
Errors may be made during program creation even by experienced programmers. Such type of errors are detected by the compiler. 
Debugging means removing the errors..

34) What is the purpose of main() function?The function main() invokes other functions within it.It is the first function to be called when the program starts execution.
It is the starting function.
It returns an int value to the environment that called the program.
Recursive call is allowed for main( ) also.
It is a user-defined function.

35) What is meant by type casting?
It is the explicit type conversion required for a number before carrying out processing or assigning to another variable.

36) What are the primitive data types in c?There are five different kinds of data types in C.

37) What is the use of typedef?
The typedef help in easier modification when the programs are ported to another machine.A descriptive new name given to the existing data type may be easier to understand the code.

38) What is meant by type specifiers?
Type specifiers decide the amount of memory space occupied by a variable. In the ease of integral types; it also explicitly states the range of values that the object can hold..

39) What are the types of type specifiers?The available data type specifiers are :

40) What is masking?
Masking is a process in which a given bit pattern is partly extracted into another bit pattern by means of a logical bitwise operation.

1  2  3  4  5

See the Complete C tutorial Here

Get Ebooks delivered to your email id


Subscribe to our channel


Powered by Blogger.

Home | Contact Us | DMCA | Terms of Service | Privacy | Advertise

Maven Scientists