-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLecture19 PutsAndGets.c
More file actions
38 lines (23 loc) · 900 Bytes
/
Lecture19 PutsAndGets.c
File metadata and controls
38 lines (23 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include <stdlib.h>
//Written by Bunyamin Yavuz in 2022
//Puts and Gets Function
int main()
{
/*
<-----Syntax of gets and puts----->
puts("Whatever you want to print on the screen");
gets(variableName);
* Puts function is to print something on the screen, gets funtion is to get input from keyboard.
* By using scanf function you can get before the first space character however
by using gets function you can get all the input.That's why we use gets function.
*/
// Let's get an input from the keyboard
char fname_lname_class_grade[50];
// printf("Enter your first name,last name,taken class,grade: ");
puts("Enter your first name,last name,taken class,grade: ");
gets(fname_lname_class_grade);
// To see the inputs on the screen
puts(fname_lname_class_grade);
return 0;
}