Skip to content

Tag Archives: C-Data Types

In the C programming language, the keyword ‘int’ is used in a type declaration to give a variable an integer type. However, the fact that… Read More
Take a input from user and find out the data type of input value. Examples : Input : geek Output : The input is a… Read More
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
Type conversion in C is the process of converting one data type to another. The type conversion is only performed to those data types where… 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. // Please make sure that you compile this program // using a C compiler, not a C++ compiler (Save your… 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 the following C program.  C #include<stdio.h> int main() {     float x = 0.1;     if (x == 0.1)         printf("IF");     else if (x… Read More
Output of following program? #include<stdio.h> int main() {     float x = 0.1;     if ( x == 0.1 )         printf("IF");     else if (x == 0.1f)         printf("ELSE… Read More
How to write C code to print range of basic data types like int, char, short int, unsigned int, unsigned char etc? It is assumed that… Read More
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
#include <stdio.h> int main() {     if (sizeof(int) > -1)         printf("Yes");     else         printf("No");     return 0; } (A) Yes (B) No (C) Compiler Error (D) Runtime Error… Read More
Assume that the size of char is 1 byte and negatives are stored in 2’s complement form #include<stdio.h> int main() {     char c = 125;… Read More
Output? int main() {     void *vptr, v;     v = 0;     vptr = &v;     printf("%v", *vptr);     getchar();     return 0; } (A) 0 (B) Compiler Error (C)… Read More

Start Your Coding Journey Now!