Skip to main content

Posts

Showing posts from May, 2016

C Interview Questions And Answers - Part 2.

What is printf()? Answer: printf() is an inbuilt library function in C library by default. This function is declared and related macros are defined in “stdio.h” header file. printf() function is used to print the “character, string, float, integer, octal and hexadecimal values” onto the output screen. What is scanf()? Answer: scanf() is an inbuilt library function in C library by default. This function is declared and related macros are defined in “stdio.h” header file. scanf() function is used to read character, string, numeric data from keyboard. What is void in C? Answer: Void is an empty data type that has no value. We use void data type in functions when we don’t want to return any value to the calling function. Example: void sum (int a, int b); – This function won’t return any value to the calling function. int sum (int a, int b); – This function will return value to the calling function. We use void data type in pointer like “void *p”. It means, po