Question Detail

Out of following program :
float x = 10.7;
int i;

i = (int) x;
print i;

  • null
  • error
  • 10
  • garbage value
Similar Questions :

1. The first expression in a for loop is

  • Step value of loop
  • Value of the counter variable
  • Any of above
  • None of above

2. 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

3. 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

4. Which operator in c can't be overloaded

  • %
  • +
  • ::
  • -

5. To access the members of structure which symbol is used

  • *
  • -
  • ,
  • .
Read more from - C Programming Questions Answers - Chapter 1