1. #include <stdio.h>
2. #include <time.h>
3.
4. int main()
5. {
6. int A, B;
7. int Result;
8.
9. time_t rawtime=time(NULL);
10. // get the two input values
11. printf("input value for A "); //prompt for first value
12. scanf("%d", &A); //then read input
13. printf("input value for B"); //prompt for second value
14. scanf("%d", &B); //then read input
15. // print time and date
16. printf("\nOperators %s", ctime(&rawtime));
17.
18. //Below are the expression results for each of the following operations:
19. Result = A+B;
20. printf("A+B= %d\n", Result);
21. // repeat above two lines for all 14 operators
22.
23.
return 0;
24.)
Illustration 1: Example that prints time and date
Answer the following questions referring to Illustration 1
1. C language requires objects to be declared before they can be used. Which lines show
objects being declared?
2. The object of line 7 is what type of container?
3. The object of line 7 is what data type for the contents?
4. Which line instructs the compiler to include the stdlib header files as part of the source
code?
5. Which library contains the header declarations allowing printing onto the console?
6. Which line is the starting point for the program called by the operating system?
7. Which folder holds the system header files?
8. Which line contains an assignment statement?
9. Every C language program has a 'main' function. That function is described by what line
numbers?