Pages

Wednesday, 23 September 2015

Job Interview C Programming Interview Questions and Answers

71) What is the purpose of scanf() and printf() functions?
=> The function scanf() is used for formatted input from the standard input and provides many of the conversion facilities.
=> It is used for formatted output to standard output device, that is, screen. The format specification string and the data to be output, are the arguments (parameters) to the printf() function.

72) What is type qualifiers?
Type qualifier adds properties to an identifier. Type qualifiers describe the manner in which the object will be modified. The application of qualifiers to an object does not affect the range or the arithmetic properties of the object.

73) What are the types of type qualifiers in c?
The two type qualifiers provided by C are :
=> const
=> volatile

74) What is meant by inheritance?
Inheritance is the process by which objects of one class acquire properties of objects of another class..

75) Do string constants represent numerical values?
No, the string constants donot have a corresponding numerical value.

76) What is meant by operator precedence?
Operator precedence describes the order in which C evaluates different operators in a complex expression.

77) What is an Operator?
An operator is a symbol, which instructs the computer to perform the specified manipulation over some data. The rich set of operators available in C enable us to write efficient and concise programs and this fact serves to set C apart from any other programming languages.

78) What are the types of operators in c?
=> Assignment operator
=> Arithmetic operators
=> Relational operators
=> Logical operators
=> Increment/Decrement operators
=> Shorthand arithmetic assignment operators
=> Conditional operator
=> Bitwise operators
=> Sizeof() operator
=> Comma operator

79) What is a ternary operator in C?
Perhaps the most unusual operator in C language is one called the conditional expression operator. Unlike all other operators in C which are either unary or binary operators the conditional expression operator is a ternary operator; that is, it takes three operands. The two symbols that are used to denote this operator are the question mark (?) and the colon (:). The first operand is placed before the ?, the second between the ? and the and the third after the :.

80) What is assignment operator?
An operator is a symbol that operates on a certain data type.In C, the ’=’ symbol is known as the assignment operator. It sots the value of the variable on the left hand side of it to that of the right hand side of it.

More Questions & Answers:-

No comments:

Post a Comment