Sayfa 26'ya kadar olanlar işlendi

This commit is contained in:
Mert Gör 2024-02-19 04:41:09 +03:00
parent a691d9687a
commit 79cea78298
No known key found for this signature in database
GPG key ID: 03E547D043AB6C8F
13 changed files with 188 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#include <stdio.h>
int main(){
int a;
{
int b;
b = 20;
a = 10;
printf("a = %d, b = %d\n", a, b); // correct
}
printf("a = %d\n", a); // correct
// printf("b = %d\n", b); // error
/**
* hwpplayer1@hwpplayer1-Aspire-A315-24P:~/Projects/hwpplayer1/c-course/c-basic$ gcc global-local-variables.c
global-local-variables.c: In function main:
global-local-variables.c:16:24: error: b undeclared (first use in this function)
16 | printf("b = %d\n", b); // error
| ^
global-local-variables.c:16:24: note: each undeclared identifier is reported only once for each function it appears in
*
*/
}