Build Student Information Tracker

CBeginner
Practice Now

Introduction

In this challenge, a new school administrator needs to create a simple digital record system to capture and manage basic student information using fundamental C programming techniques learned in the lab. The program should be able to capture student details such as full name, age, grade level, and academic score, and display the information in a formatted output.

This is a Challenge, which differs from a Guided Lab in that you need to try to complete the challenge task independently, rather than following the steps of a lab to learn. Challenges are usually a bit difficult. If you find it difficult, you can discuss with Labby or check the solution. Historical data shows that this is a beginner level challenge with a 94% pass rate. It has received a 99% positive review rate from learners.

Build Student Information Tracker

As a new school administrator, you need to create a simple digital record system to capture and manage basic student information using fundamental C programming techniques learned in the lab.

Tasks

  • Open the C program named student_tracker.c in the ~/project directory
  • Implement input methods to collect student details
  • Display the collected student information with formatted output

Requirements

  • Use the file ~/project/student_tracker.c for your solution
  • Capture the following student details:
    • Full name (string, max 50 characters)
    • Age (integer)
    • Grade level (integer)
    • Academic score (float)
  • Use scanf() to input student information
  • Use printf() to display student information with proper formatting
  • Include necessary header files
  • Ensure the program compiles without warnings

Examples

gcc student_tracker.c -o student_tracker
./student_tracker

Example Input:

Enter student name: John Doe
Enter student age: 16
Enter grade level: 10
Enter academic score: 87.5

Example Output:

--- Student Information ---
Name: John Doe
Age: 16 years
Grade Level: 10
Academic Score: 87.50

Hints

  • Remember to use & when passing variables to scanf()
  • Use %[^\n] to read full names with spaces
  • Add a space before %c in scanf() to handle input buffer
  • Use format specifiers like %.2f for precise decimal display
✨ Check Solution and Practice

Summary

In summary, the goal of this challenge is for the new school administrator to create a simple C program that can capture and manage basic student information, including full name, age, grade level, and academic score. The program should use fundamental C programming techniques to collect student details through input methods and display the information in a formatted output.