In the C programming language (after 99 standard), a new keyword is introduced known as restrict. restrict keyword is mainly used in pointer declarations as… Read More »
A type cast is basically a conversion from one type to another. There are two types of type conversion: Implicit Type Conversion Also known as… Read More »
How to print floating point numbers with a specified precision? Rounding is not required. For example, 5.48958123 should be printed as 5.4895 if given precision… Read More »
Consider below program in C. Output: 2 4 6 The above example is an example of compound literals. Compound literals were introduced in C99 standard… Read More »
In C language, we have three floating data types i.e. float, double and long double. And the exact size of each of these 3 types… Read More »
Each variable in C has an associated data type. Each data type requires different amounts of memory and has some specific operations which can be… Read More »
Predict the output of following C program.
Output of following program? (A) ELSE IF (B) IF (C) ELSE Answer: (A) Explanation: Quiz of this Question
How to write C code to print range of basic data types like int, char, short int, unsigned int, unsigned char etc?
Some data types like char , short int take less number of bytes than int, these data types are automatically promoted to int or unsigned… Read More »
(A) Yes (B) No (C) Compiler Error (D) Runtime Error Answer: (B) Explanation: In C, when an intger value is compared with an unsigned it,… Read More »
Assume that the size of char is 1 byte and negatives are stored in 2’s complement form (A) 135 (B) +INF (C) -121 (D) -8… Read More »
Output? (A) 0 (B) Compiler Error (C) Garbage Value Answer: (B) Explanation: void is not a valid type for declaring variables. void * is valid… Read More »
In C, sizes of an integer and a pointer must be same. (A) True (B) False Answer: (B) Explanation: Sizes of integer and pointer are… Read More »
Predict the output of following C program (A) Compiler Error (B) 12 (C) 10 (D) Empty Answer: (C) Explanation: The value ‘\012’ means the character… Read More »