Question Detail

What is use of \r in c

  • used to insert a vertical tab
  • used to insert a tab
  • places cursor at the end of line
  • places cursor at the start of line
Similar Questions :

1. What is true about fputs function

  • write to a file
  • takes two parameters
  • requires a file pointer
  • all of above

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

i = (int) x;
print i;

  • null
  • error
  • 10
  • garbage value

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. Difference between calloc() and malloc()

  • calloc() takes a single argument while malloc() needs two arguments
  • malloc() takes a single argument while calloc() needs two arguments
  • malloc() initializes the allocated memory to ZERO
  • calloc() initializes the allocated memory to NULL

5. Disadvantage of array in C is

  • We can easily access each element
  • It is necessary to declare too many variables
  • It can store only one similar type of data
  • None of above
Read more from - C Programming Questions Answers - Chapter 1