C bootcamp · Lab 01

Hello, C

easyOutput5 minLesson: C Output

Read the question, write C on the right, then Run or Check.

QuestionHint and solution stay closed until you open them

Write a C program that prints exactly this line, then a newline:

Hello, C

This is the first bootcamp lab. Compile it, then press Check. The checker compares your stdout to the expected line.

Output. One line: Hello, C

Constraints

  • Use printf.
  • Do not print extra spaces or quotes.

Examples

Example 1 — No input. Print that exact text.
Input
(none)
Output
Hello, C
Hint
  1. Include stdio.h, then call printf from main.
  2. A newline is \n inside the format string: printf("Hello, C\n");
Show correct code

Peek only after you have tried. You can still Check your own version.

#include <stdio.h>

int main(void) {
  printf("Hello, C\n");
  return 0;
}
main.cC17 · gcc · Ctrl + Enter runs
ResultIdle
Run to see output. Check grades the tests.