Submitted by Anonymous (not verified) on Mon, 02/25/2013 - 23:51

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.

 

    Q How much is the hex number 32?
    Ans.  Hexadecimal, or hex for short, is a base-16 numerical system. Therefore, 32 (hex) is equal to 3*161+2*160, or 50 in decimal.

 

    Q Are getc(stdin) and getchar() equivalent?
    Ans. Because the getchar() function reads from the file stream stdin by default, getc(stdin) and getchar() are equivalent.

 

    Q In the function printf("The integer %d is the same as the hex %x", 12, 12), what is the relationship between the format specifiers and the expressions?
    Ans. The two format specifiers, %d and %x, specify the formats of numeric values contained in the expression section. Here the first numeric value of 12 is going to be printed out in integer format, while the second 12 (in the expression section) will be displayed in the hex format. Generally speaking, the number of format specifiers in the format section should match the number of expressions in the expression section.

 

Related Items

C প্রোগ্রামিংয়ে Function কে কিভাবে কল করবেন ?

Making Function Calls

Based on what you've learned so far, you can write a C program that calls the integer_add() function to calculate an addition and then print out the result on the screen. An example of such a program is demonstrated in Listing 3.2.

 

C প্রোগ্রামিংয়ের Statements সম্পর্কে আলোচনা

Statements

In the C language, a statement is a complete instruction, ending with a semicolon. In many cases, you can turn an expression into a statement by simply adding a semicolon at the end of the expression.

For instance, the following

C প্রোগ্রামিং এর বিভিন্ন ধরনের Expressions এর আলোচনা

Expressions
An expression is a combination of constants, variables, and operators that are used to denote computations.

For instance, the following:

(2 + 3) * 10

Exercises : Answer these Questions

After Reading and Understanding the Chapter 03 : The Essentials of C Programs, please give the answer of following Questions. if you able to answer these question correctly then please proceed to next chapter which is on Data Types and Names in C programming.