USE OF GETS,PUTS,GETCH;

QUESTION:

Formatted and Unformatted Functions (Programming in C using formatted and unformatted functions scanf(), printf(), getch(), getche(), getchar(), gets(), puts().)

ANSWER:-

#include<stdio.h> //header file//
#include<conio.h> //header file//
int main() //function//
{
    char c[10];
    char d[10];
    printf(“hello world”);
//printing keyword//
    printf(“\nHELLO WORLD”);
    printf(“\nINPUT YOUR NAME:”);
    gets(c); //recieve string//
    printf(“\nINPUT SURNAME:”);
    scanf(“%s”,&d);
//recieve string as a character array//
    printf(“\nYOUR NAME IS %s “,c);
    puts(d);
// print string//

    printf(“\nPROGRAMMING @ CODE STUDIO”);

    getch(); //read the data on screen//

}

 

OUTPUT:-

HELL