What will be output of the following “c” code?
![]()
Practice Const – What will be output of the following “c” code?
#include
void main()
{
int const *p=5;
printf("%d", ++(p));
} ![]()
Practice Const – What will be output of the following “c” code?
#include
void main()
{
int const *p=5;
printf("%d", ++(p));
} ![]()
Practice Strings – What will be output of the following “c” code?
#include
void main()
{
char s[]="main";
int i;
for(i=0; s[i]; i++)
printf("%c %c %c %c", s[i], *(s+i), *(i+s),i[s]);
} ![]()
Practice Arrays – What will be output of the following “c” code?
#include
void main()
{
int c[]={2.8,3.4,4,6.7,5};
int j, *p=c, *q=c;
for(j=0; j<5; j++)
{
printf("%d", *c);
++q;
}
for(j=0; j<5; j++)
{
printf("%d", *p);
++p;
}
} ![]()
Practice Bitwise Operators – What will be output of the following “c” code?
#include
void main()
{
printf(" %x", -1<<4);
} ![]()
Practice Declarations and Initializations – What will be output of the following “c” code?
#include
void main()
{
int i=10;
i=!i>14;
printf("%d", i);
} ![]()
Practice Basic Concept – What will be output of the following “c” code?
#include
void main()
{
printf("
ab");
printf(" si");
printf("
ha");
} ![]()
Practice C Preprocessor – What will be output of the following “c” code?
#include
#define SQR(x) x*x
void main()
{
int a =5, b, c;
b = SQR(a++);
c = SQR(++a);
printf("%d %d", b, c);
} ![]()
Practice Expressions – What will be output of the following “c” code?
#include
void main()
{
int x =5;
x = (x++) + (++x) + (x) +(x--) + (--x);
printf("%d",x);
} ![]()
Practice Declarations and Initializations – What will be output of the following “c” code?
#include
void main()
{
100;
printf("%d",100);
} ![]()
Practice Structures, Unions, Enums – What will be output of the following “c” code?
#include
enum color{BLACK, BLUR, GREEN};
void main()
{
printf("%d %d %d", BLACK, BLUR, GREEN);
} ![]()
Practice Basic Concept – What will be output of the following “c” code?
#include
void main() {
int i = 400, j = 300;
printf("%d %d ");
} ![]()
Practice Basic Concept – What will be output of the following “c” code?
#include
void main() {
int i =400, j = 300;
printf("%d %d %d %d ");
} ![]()
Practice Pointers – What will be output of the following “c” code?
#include
void main() {
char *p;
p = "Hello";
printf("%c", *&*p);
} ![]()
Practice Basic Concept – What will be output of the following “c” code?
#include
void main( )
{
int i;
printf("%d", scanf("%d", &i));
}
If input of is given by keyboard is 10.
![]()
Practice Control Instructions – What will be output of the following “c” code?
#include
void main() {
int i= 0;
for(; i++; printf("%d", i));
printf("%d", i);
}