Step 2: Create Global Phonebook Storage

Easy Section 1: Project Foundation
Solve in Playground →

Problem Statement

Add the permanent global storage required by the Contact Book. Create a phonebook array capable of storing 100 Contact records and a global contact_count initialized to 0. Retain all code from Task 1 and extend the initialization output to report the available storage and current contact count.

Input Format

No input is required.

Output Format

Print three lines exactly: Contact Book Ready., Phonebook Capacity: 100, and Contacts: 0.

Constraints

The phonebook array must contain exactly 100 Contact elements. contact_count must initially be 0.

Sample Output

Contact Book Ready.
Phonebook Capacity: 100
Contacts: 0

Explanation

The global phonebook array becomes the permanent storage area for all contacts, while contact_count tracks the number of active records. These globals will remain available to every later function.

Starter Code

#include <stdio.h>
#include <string.h>

struct Contact {
    int id;
    char name[50];
    char phone[15];
};

// Write your code here

int main() {
    printf("Contact Book Ready.");
    // Write your code here
    return 0;
}

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used