File Search

Medium File Handling
Solve in Playground →

Problem Statement

Write a C program to search for a target word inside a text file and print ‘Found’ or ‘Not Found’.

Input Format

First line: Text file content. Second line: Target word to search.

Output Format

Print 'Found' if the word exists in the file, otherwise 'Not Found'.

Constraints

Word length <= 50

Sample Input

Embedded C Programming
Programming

Sample Output

Found

Explanation

Scans file words and checks for match with target string.

Starter Code

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

int main() {
    char content[101], target[51];
    if (scanf("%100s %50s", content, target) == 2) {
        // 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