What is the output of the following problem ?

			  		

Loading

Practice Strings – What is the output of the following problem ?


#include
int main()
{
char *c;
c = "Hello";
printf("%s
", c);
return 0;
}

What is the output of the following problem ?


Loading

Practice Functions – What is the output of the following problem ?


#include

int main()

{

int j;

for(j=0;j<3;j++)

foo();

return 0;

}

foo() {

static int i = 10;

i+=10;

printf("%d",i);

}

What will be the output of the following program.

Loading

Practice Declarations and Initializations – What will be the output of the following program.


#include
int main() {
int i,j;
j = 10;
i = j++ - j++;
printf("%d %d", i,j);
return 0;
}

What is the output of the following problem ?

			  		

Loading

Practice Functions – What is the output of the following problem ?


#include
int main()
{
int j,ans;
j = 4;
ans = count(4);
printf("%d
",ans);
return 0;
}
int count(int i)
{
if ( i < 0)
return(i);
else
return( count(i-2) + count(i-1));
}

What is the output of the following problem ?

			  		

Loading

Practice Declarations and Initializations – What is the output of the following problem ?


#include
int main()
{
int i=4;
if(i=0)
printf("statement 1");
else
printf("statement 2");
return 0;
}

What will be output of following c program?

			  		

Loading

Practice Pointers – What will be output of following c program?


int main()
{
char *name = "name";
change (name);
printf ("%s", name);
return 0;
}
change (char *name)
{
char *nm = "newname";
name = nm;
}

Which are valid?

(i) pointers can be added.
(ii) p

Loading

Practice Pointers – Which are valid?

(i) pointers can be added.
(ii) pointers can be subtracted.
(iii) integers can be added to pointers.

Which of these are valid declarations?

(i) union {

Loading

Practice Structures, Unions, Enums – Which of these are valid declarations?

(i) union {
int i;
int j;
};

(ii) union u_tag {
int i;
int j;
};

(iii) union {
int i;
int j;
FILE k;
};

(iv) union {
int i;
int j;
}u;

x = fopen (b, c) what is b?

Loading

Practice Input / Output – x = fopen (b, c) what is b?

What will be output of following c program?

			  		

Loading

Practice Arrays – What will be output of following c program?


int main ()
{
int i = 2;
twice (2);
printf ("%d", i);
}
twice (int i)
{
print ("Inside");
}
int i, b[] = {1, 2, 3, 4, 5}, *p;
p = b;
++*p;
p += 2;

What is the value of *p;

Which of the choices is true for the mentioned declaration?

Loading

Practice Pointers – Which of the choices is true for the mentioned declaration?

const char *p;
and
char * const p;

Choose one of them: