C Interviews
C Interview
There are basically three types of instructions in C are : ? Type Declaration Instruction ? Arithmetic Instruction ? Control Instruction
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.
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.
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
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
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
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.
Masking is a process in which a given bit pattern is partly extracted into another bit pattern by means of a logical bitwise operation.
? A single character constant consists of only one character and it is enclosed within a pair of single quotes. ? A string constant consists of one or more characters and it is enclosed within a pair of double quotes.
A numeric value, may have a positive or a negative sign. In the memory, for a variable, one bit is used exclusively to maintain the sign of the data. If we don't have sign, the sign bit also may be used for data. If the value is negative, the sign bit is 1, and if it is positive, it will be 0.