E-learning

Computer-Based Training (CBT) or Internet-Based Training (IBT) or Web-Based Training (WBT) courses at BengalStudents website

Exercises : Answer the following Question

Workshop

To help solidify your understanding of this hour’s lesson, you are encouraged to answer the quiz questions and finish the exercises provided in the Workshop before you move to the next lesson. The answers and hints to the questions and exercises are given in Appendix E, “Answers to Quiz Questions and Exercises.”

Quiz

Question and Answer

Question And Answer

Q What are stdin, stdout, and stderr?
Ans. In C, a file is treated as a series of bytes that is called file stream. stdin, stdout, and stderr are all pre-opened file streams. stdin is the standard input for reading; stdout is the standard output for writing; stderr is the standard error for outputting error messages.

Exercises : Answer the following Question

Workshop
To help solidify your understanding of this hour’s lesson, you are encouraged to answer the quiz questions and finish the exercises provided in the Workshop before you move to the next lesson. The answers and hints to the questions and exercises are given in Appendix E, “Answers to Quiz Questions and Exercises.”

Quiz

Exercises : Answer the following Question

Workshop
To help solidify your understanding of this hour’s lesson, you are encouraged to answer the quiz questions and finish the exercises provided in the Workshop before you move to the next lesson. The answers and hints to the questions and exercises are given in Appendix E, “Answers to Quiz Questions and Exercises.”

Quiz

1. Are the integer divisions of 134/100 and 17/10 equal?

2. Is the result of 3000 + 1.0 a floating-point number? How about 3000/1.0?

The main() Function, return statement in C Programming

The main() Function
In line 4 of Listing 2.1, you see this function:

main ()

This is a very special function in C. Every C program must have a main() function, and every C program can only have one main() function. More generic discussions about functions are given in Hour 3, “The Essentials of C Programs.”

You can put the main() function wherever you want in your C program. However, the execution of your program always starts with the main() function.