This is my second C project β a program that collects and displays student details using scanf and printf.
- Takes user input:
- College name
- Branch
- Roll number
- Section
- Percentage
- Displays the details in a clean format.
- Using
scanffor different data types (%s,%d,%c,%f) - Handling string input in C
- Formatting output with
printf
- Save the code as
student_info.c - Compile using:
gcc student_info.c -o student_info
3.Run the program:
./student_infowhat is the name of your college: AITS
which branch are you studying : ECE
how much is your roll number : 16
which section you belongs to : A
what is your average percentage you are maintaining from school to engineering : 94.02
college : AITS
branch : ECE
rollnumber : 16
section : A
percentage : 94.02