Q1. What is #include in C?
Also known as file inclusion directive.
#include adds code from a reserved header file to our code file before compiling our C programme.
Q2. What is getch () in C?
getch() used to hold the screen. Getch stand for Get Character.
Header file conio.h defines it.
Q3. What is void in C?
The void keyword indicates a function does not returns a value.
Q4. What is stdio.h in C?
stdio.h is for standard input and output. It is a header file which imports different functions, variables, etc, to performs input output operations.
Q5. What is clrscr in C?
clrscr means clear screen. It is a function to clear previous oled outputs from console screen.
Q6. What is the full form of Conio?
Console input output.
Q7. What is a printf in C?
printf is used to print formatted text to the standard output stream.
In printf( ), f is used for formatted text.
Q8. What is scanf () in C?
The scanf function is used for reading input from the user or from a file and storing it in variables.
Q9. What is %d in C called?
%d is a format specifier. For decimal integer.
Q10. List some format specifier in C?
Format specifier | Used for |
%c | Character |
%d | Integer type |
%f | Float type |
%s | String |
Q11. Example of Character format specifier?
#include <stdio.h> void main() { char gender = 'm'; printf("%c", gender); }
Q12. Example if integer format specifier?
#include <stdio.h>
void main() {
int age = 20;
printf("%d", age);
}
Q13. Example of float format specifier?
#include <stdio.h>
void main() {
char percentage = 96.75;
printf("%f", percentage);
}
Q14. Example of string format specifier?
#include <stdio.h>
void main() {
char name[] = "EasyExamNotes";
printf("%s", name);
}