These are some old concepts used in 16 bit Intel architectures in the days of MS DOS, not much useful anymore. Near pointer is used to store 16 bit addresses means within current segment on a 16 bit machine. The limitation is that we can only access 64kb of data at a time. A far pointer is typically 32 bit that can access memory outside current segment. To use this, compiler allocates a segment register to store segment address, then another register to store offset within current segment. Like far pointer, huge pointer is also typically 32 bit and can access outside segment. In case…
-
-
Semi-colon is needed by the compiler and as the name suggests Preprocessors are programs that process our source code before compilation. Therefore the semi-colon is not required.
-
Modifier is a prefix to the basic data type which is used to indicate the modification for storage space allocation to a variable. Example– In 32-bit processor storage space for the int data type is 4.When we use it with modifier the storage space change as follows. Long int -> Storage space is 8 bit Short int -> Storage space is 2 bit
-
Yes, it is working without any error. Some programmers like to use this to organize the code. But the main purpose of curly brackets is to group several lines of codes.
-
Incorrect operator is ‘<>’.This is the format correct when writing conditional statements, but it is not a correct operation to indicate not equal in C programming and it gives compilation error as follows. Code Error
-
C support only 2 loops: Entry Control: This loop is categorized in 2 part a. while loop b. for loop Exit control: In this category, there is one type of loop known as a. do while loop.
-
main is necessary for executing the code. Code is void main() { }
-
In general programs store data into files and retrieve existing data from files. With the sequential access file such data saved in a sequential pattern. When retrieving data from such files each data needs to read one by one until the required information found.
-
yes, the const means that the variable cannot be assigned a new value. The value can be changed by other code or pointer. For example the following program works fine. int main(void) { const volatile int local = 10; int *ptr = (int*) &local; printf("Initial value of local : %d \n", local); *ptr = 100; printf("Modified value of local: %d \n", local); return 0; }
-
The volatile keyword is intended to prevent the compiler from applying any optimizations on objects that can change in ways that cannot be determined by the compiler. Objects declared as volatile are omitted from optimization because their values can be changed by code outside the scope of current code at any time.