C Faq's
This difference is the place where the condition is tested. The for tests the condition before executing any of the statements within the body of the for loop. As against this, the do while tests the condition after having executed the statements within the loop.
Sequence control structure : may consist of a single statement or a sequence of statements with a single entry and single exit. Selection control structure : performs one out of two or more statements depending upon the condition. Looping control structure : has one condition and a sequence structure which is executed a number of times depending upon the condition.
The value of each of the actual parameters in the calling function is copied into corresponding formal arguments of the called function. So, variables in the caller function (actual parameters) are distinct from variables in the called function (formal parameters) even though they may have same names and their values are not affected in the called function, since they have different memory locations
? A symbolic constant is a name that substitutes for a sequence of characters. The characters may be a numeric constant, a character constant or a string constant. ? A symbolic constant allows a name to appear in place of a numeric constant, a character constant or a string. ? Symbolic constants are usually defined at the beginning of a C program. The symbolic constants may then appear later in the program in place of the numeric constants, character constants, and so on.
There are 32 keywords supported by ANSI C : ? Auto ? Double ? Int ? Struct ? Break ? Else ? Long ? Switch
A bit field is a commonly used data structure used to compactly hold a set of Boolean flags. Instead of using Boolean variables for each flag, the flags are stored in a fixed-size data structure like an integer, whose size in bits is known. The Boolean flags are then stored in each bit of the data structure, minimizing memory usage. In order to retrieve, read and write information from and to a bit field, the programmer uses the bitwise operators AND, OR and NOT.
The Bit field are useful for number of reasons, such as : ? When storage is limited, we can store several Boolean variables in one byte ? Certain devices transmit status information encoded into one or more bits within a byte ? Certain encryption routines need to access the bits within a byte
The preprocessor uses programmer supplied commands to prepare the source program for compilation. The translator then accepts source program and converts it into machine code and generates the object module. Depending on the compiler design, the preprocessor and translator can work together, or the preprocessor can create a separate version of the source program, which is then read by the translator.
? Each character constant has some integer value associated with it, while numeric type constants can be exact quantities or even approximations. ? The value of a character constant may vary from one computer to another but the constants themselves are independent of the character set. ? A character constant cannot be of length more than 1, but a numeric type constant has no such restriction.
The string constants are always enclosed in double quotes, while character constants are enclosed in apostrophes (single quotation marks). A character constant has an equivalent integer value, whereas a single-character string constant does not have an equivalent integer value