Sie sind auf Seite 1von 62

Tutorial de Lenguaje C

Departamento de Informática
Universidad Nacional de San Luis
codigo valor_int/valor_float
sueldo

empleado valor
i 3000 10

i 3000 10

p 3000
incremento() main()

1 0
x i

incremento() main()

1
x i
swap() main()

2
x a
2
temp 4
y b

4
x a
2
temp 4
y b

4
x a
2
temp 2
y b
a

7 4 9 11 8

p
a

7 4 9 11 8

p+4
p+3
p p+2
p+1
s

2.5 s.x
s.y
3.1

p
a[0] a[1] a[2] a[3]

x
y

q
a[0] a[1] a[2] a[3]

2 x
8 y

q
str1
’h’ ’o’ ’l’ ’a’ ’\0’

’h’ ’o’ ’l’ ’a’ ’\0’

str2
str1 str2
? ? ? ? ? ? ’a’ ’b’ ’c’ ’\0’

s1 s2

str1 str2
? ? ? ? ? ? ’a’ ’b’ ’c’ ’\0’

s1 s2

str1 str2
’a’ ? ? ? ? ? ’a’ ’b’ ’c’ ’\0’

s1 s2
str1 str2
’a’ ’b’ ’c’ ’\0’ ? ? ’a’ ’b’ ’c’ ’\0’

s1 s2
argc 4

argv[0] ’p’ ’r’ ’o’ ’g’ ’r’ ’a’ ’m’ ’a’ ’\0’
argv[1]
’a’ ’.’ ’t’ ’x’ ’t’ ’\0’
argv[2]
’5’ ’\0’
argv[3]
argv[4] NULL ’h’ ’o’ ’l’ ’a’ ’\0’

Das könnte Ihnen auch gefallen