Can you combine the following two statements into one?
   char *p; 
p

Home | Discussion Forum
Taiyari24Hour

Can you combine the following two statements into one?

   char *p; 
p = (char*) malloc(100);



View More Related Question

1) What will be the output of the program ?

 #include<stdio.h>
int main()
{
int i=3, *j, k;
j = &i;
printf("%d\n", i**j*i+*j);
return 0;
}

2) Can you combine the following two statements into one?

   char *p; 
p = (char*) malloc(100);

3) What will be the output of the following C code?

 #include <stdio.h>
int x = 0;
void main()
{
int *ptr = &x;
printf("%p\n", ptr);
x++;
printf("%p\n ", ptr);
}

4) What will be the output of the following C code?

 #include <stdio.h>
int main()
{
int i = 10;
void *p = &i;
printf("%f\n", *(float*)p);
return 0;
}

5) What will be the output of the program ?

  #include<stdio.h>
int main()
{
int x=30, *y, *z;
y=&x; /* Assume address of x is 500 and integer is 4 byte size */
z=y;
*y++=*z++;
x++;
printf("x=%d, y=%d, z=%d\n", x, y, z);
return 0;
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.