download Mastguru Android App

Question Detail

What will be the output of following program
#include
main()
{
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}

  • error
  • 0
  • 10
  • Garbage value
Similar Questions :

1. Adding to a pointer that points to an array will

  • Cause an error
  • Increase the value of the element that the pointer is pointing to
  • Cause the pointer to point to the next element in the array
  • None of above

2. A variable in c

  • must have a valid datatype
  • can't have a name same as keyword
  • must have a name starting with a character
  • All of above

3. Difference between structure and union is

  • We can define functions within structures but not within a union
  • We can define functions within union but not within a structure
  • The way memory is allocated
  • There is no difference

4. If include files can be nested

  • Yes
  • No

5. What will be output of
#include
void main()
{
char test =`S`;
printf("\n%c",test);
}

  • S
  • Error
  • Garbage value
  • None of above
Read more from - C Programming Questions Answers - Chapter 1
Post a comment

  • Rajib Roy 2 years ago

    Suorer bacha "printf("%d",x);" ai statement ta run kore "0" output ki tomar nung er bari giye dia sche???????

  • anand 5 years ago

    que no7 in c. how the answer is zero.can you explain