printf example written

This commit is contained in:
Mert Gör 🇹🇷 2024-06-30 15:12:30 +03:00
parent 81e4765792
commit e0dfc90937
Signed by: hwpplayer1
GPG Key ID: 03E547D043AB6C8F
2 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2024-06-30 hwpplayer1 <hwpplayer1@debian>
* c-basic/printf.c: printf example
* c-basic/foo.c: Foo example
* c-basic/helloworld.c: hello world example

12
c-basic/printf.c Normal file
View File

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