1.

Gets() और puts() फंक्श नों में अन्तर बताइए।

Answer»

gets() is short for get_string.

puts() is short for put_string.

Step-by-step explanation:

gets() is short for get_string. we can  type a string and it saves it in the    memory.

  • If we want to READ from the string user on run time, we can use the get () function for this.  
  • In this function, we can PASS the NAME of the character array in which we want to store the string.  
  • All the characters entered by the user get stored in a char array.
  • In this null character is added to the array to make it a string.
  • The gets() function allows the user to enter the space-separated STRINGS. It returns the string entered by the user.

puts() is short for put_string. this function will print a given string.

  • This function is used to print a char array as a complete string.
  • In this function, those character  arrays are passed which we want to print as a complete string.  


Discussion

No Comment Found