C Language INTERVIEW QUESTION & ANSWERS
56. |
What is the difference b/w formatted&unformatted I/O functions? |
|
The formatted I/O functions allow programmers to specify the type of data and the way in which it should be read in or written out. On the other hand, unformatted I/O functions do not specify the type of data and the way is should be read or written. |
57. |
How to declare pointer variables? |
|
If a variable is going to be a pointer, it must be declared as such. A pointer declaration consists of a base type, an *, and the variable name. The general form for declaring a pointer variable is data _type * var_ name;
|
58. |
What is the difference between c &c++? |
|
c++ ia an object oriented programing but c is a procedure oriented programing.c is super set of c++. c can't suport inheritance,function overloading, method overloading etc. but c++ can do this.In c-programe the main function could not return a value but in the c++ the main function shuld return a value. |
59. |
What is the use of putchar function? |
|
The putchar function displays one character on the display monitor. The character to be displayed is of type char. The syntax for putchar function is as given below :
putchar (ch_var); Where ch_var is a previously declared character variable.
|
60. |
What is the use of getchar functions? |
|
The getchar function accepts a single character from the keyboard. The function does not require any arguments, though a pair of empty parentheses must follow the word getchar as a syntax. It returns a single character from a standard input device (typically a keyboard ) and it can be assigned to predeclared character variable. |