Submitted by tushar pramanick on Mon, 02/25/2013 - 11:35

Questions and Answers


Q Why do you need to put comments into your programs?
A Comments help us document what a program, or a special portion of a program, does. Especially when a program becomes very complex, we need to write comments to mark different parts in the program.

 

Q Why is the main() function needed in your program?
A The execution of a C program starts and ends with the main() function. Without the main() function, the computer does not know where to start to run a program.

 

Q What does the #include directive do?
A The #include directive is used to include header files that contain the declarations to the functions used in your C program. In other words, the #include directive tells the C preprocessor to look into directories and find the specified header file.

 

Q Why do you need a linker?
A After compiling, some function code may still be missing in the object file of a program. A linker must then be used to link the object file to the C standard library or other user-generated libraries and include the missing function code so that an executable file can be created.

 

 

Related Items

Using Unions

Using Unions

Now let's focus on the applications of unions. Basically, there are two kinds of union applications, which are introduced in the following two sections.
Referencing the Same Memory Location Differently

Unions Versus Structures

Unions Versus Structures

What Is a Union?

What Is a Union?

Exercises : Answer the following Question

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.

Question and Answer

Question and Answer

    Q What are the left and right values?