char has lesser bytes than int and int has lesser bytes than double in any system
Explanation
Skill Test is a unique platform to assess your skills and showcase your expertise.
#include
int main()
{
enum {ORANGE = 5, MANGO, BANANA = 4, PEACH};
printf("PEACH = %d\n", PEACH);
}
In enum, the value of constant is defined to the recent assignment from left.
void foo(const int *);
const int i = 10;
printf("%d ", i);
foo(&i);
printf("%d", i);
void foo(const int *i)
*i = 20;
Cannot change a const type value.
#include <stdio.h>
int a = 1, b = 1, d = 1;
printf("%d, %d, %d", ++a + ++a+a++, a++ + ++b, ++d + d++ + a++);
int k;
for (k = 0; k < 10; k++);
There can be blocks inside block and within blocks variables have only block scope.
void main()
for (k = -3; k < -5; k++)
printf("Hello");
j = 10;
printf("%d\n", j++);
return 0;
Variable j is not defined.
int x = 97;
char y = x;
printf("%c\n", y);
What is the output of this C code? #include <stdio.h>
int var = 010;
printf("%d", var);
010 is octal representation of 8.
It is legal in Java, not in C.
int x = 0;
if (x = 0)
printf("Its zero\n");
else
printf("Its not zero\n");
if (x++)
printf("true\n");
else if (x == 1)
printf("false\n");