Contact Book

Medium Mini Projects & Algorithmic Challenges
Solve in Playground →

Problem Statement

Write a C++ program implementing a contact directory supporting addition, searching by name, and listing contacts.

Input Format

Number of commands N, followed by commands ('ADD', 'SEARCH').

Output Format

Print confirmation or contact details.

Constraints

1 <= N <= 50

Sample Input

2
ADD Alice 9876543210
SEARCH Alice

Sample Output

Added
Name: Alice, Phone: 9876543210

Explanation

Manages string-based records in a list.

Starter Code

#include <iostream>
#include <vector>
#include <string>

class Contact {
public:
    std::string name;
    std::string phone;
    Contact(std::string n, std::string p) : name(n), phone(p) {}
};

int main() {
    int n;
    if (std::cin >> n) {
        // Write your contact book logic 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