Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Write Your First C Program | Getting Started with C
C Programming Fundamentals

bookChallenge: Write Your First C Program

Before you move forward, it is important to solidify your understanding of how a basic C program is structured. In the previous example, you learned that every C program must include the main function, which serves as the entry point for execution. You also saw how to use the #include <stdio.h> directive to access input and output functions such as printf. Additionally, you learned that statements in C end with a semicolon, and that curly braces {} are used to define the body of a function. With these elements in mind, you are ready to put your knowledge into practice by writing your own C program.

Завдання

Swipe to start coding

Write a function that prints a custom message to the console. The function should display a unique message of your choice when called from main.

  • The function must print a custom message to the console.
  • The function must not take any parameters and must not return a value.
  • The function must be called from main.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 2
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you give me an example of a simple C program?

What are some common mistakes beginners make when writing their first C program?

Can you explain the purpose of the `#include <stdio.h>` directive in more detail?

close

bookChallenge: Write Your First C Program

Свайпніть щоб показати меню

Before you move forward, it is important to solidify your understanding of how a basic C program is structured. In the previous example, you learned that every C program must include the main function, which serves as the entry point for execution. You also saw how to use the #include <stdio.h> directive to access input and output functions such as printf. Additionally, you learned that statements in C end with a semicolon, and that curly braces {} are used to define the body of a function. With these elements in mind, you are ready to put your knowledge into practice by writing your own C program.

Завдання

Swipe to start coding

Write a function that prints a custom message to the console. The function should display a unique message of your choice when called from main.

  • The function must print a custom message to the console.
  • The function must not take any parameters and must not return a value.
  • The function must be called from main.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 2
single

single

some-alt