printf example rewritten

This commit is contained in:
2025-06-17 13:10:20 +03:00
parent bde2e44f89
commit dc07b91a12
3 changed files with 22 additions and 8 deletions

View File

@ -1,7 +1,13 @@
#include <stdio.h>
#include "hello.h"
#include "print_example.h"
int main() {
hello();
print_example();
return 0;
}
/**
gcc main.c print_example.c -o print_example
**/

View File

@ -1,12 +1,12 @@
#include <stdio.h>
#include "print_example.h"
int print_example()
{
int a = 10, b = 20;
int a = 10, b = 20;
printf("a = %d, b = %d\n", a, b);
printf("a ? = %d, b ? = %d\n", b , a);
printf("%d%d\n", a, b);
printf("a = %d, b = %d\n", a, b);
printf("a ? = %d, b ? = %d\n", b , a);
printf("%d%d\n", a, b);
return 0;
return 0;
}

8
c-basic/print_example.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef PRINT_EXAMPLE_H
#define PRINT_EXAMPLE_H
#include <stdio.h>
int print_example();
#endif