Está en la página 1de 21

Intro a C

Hello World!

With by @vichoeq & @KnowYourselves


Quiénes somos

Vicho Errázuriz Raúl Álvarez


Ayudante EDD Ayudante SSOO y Redes
Agradecimientos
Agradecemos profundamente a todas las personas que nos ayudaron revisando este
material:

@dmelberg @daleal
@javieraochoa @francisca1
@cruz @IchottMano
@fdflorenzano @felipecr00
@VicenteMerino @fgbruna
@yerkko @wachunei

¡Muchas Gracias!
C v/s Python
C v/s Python

1. Compilado 1. Interpretado
2. Bajo nivel 2. Alto Nivel
3. Fuertemente tipificado 3. Dinámicamente tipificado
4. Eficiente 4. No tan eficiente
5. Solo funciona en UNIX 5. Funciona hasta en una tostadora
C v/s Python - Lenguaje Compilado

main.c main

gcc

$ gcc main.c -o main


$ ./main
Hello world!
C v/s Python

1. Compilado 1. Interpretado
2. Bajo nivel 2. Alto Nivel
3. Fuertemente tipificado 3. Dinámicamente tipificado
4. Eficiente 4. No tan eficiente
5. Solo funciona en UNIX 5. Funciona hasta en una tostadora
C v/s Python

1. Compilado 1. Interpretado
2. Bajo nivel 2. Alto Nivel
3. Fuertemente tipado 3. Dinámicamente tipado
4. Eficiente 4. No tan eficiente
5. Solo funciona en UNIX 5. Funciona hasta en una tostadora
C v/s Python

1. Compilado 1. Interpretado
2. Bajo nivel 2. Alto Nivel
3. Fuertemente tipado 3. Dinámicamente tipado
4. Soportado principalmente por UNIX 4. Soportado por cualquier sistema
C v/s Python

1. Compilado 1. Interpretado
2. Bajo nivel 2. Alto Nivel
3. Fuertemente tipado 3. Dinámicamente tipado
4. Soportado principalmente por UNIX 4. Soportado por cualquier sistema
5. Eficiente 5. No tan eficiente
C v/s Python - Tiempo
C v/s Python - Memoria
¿Por qué C?
C v/s Python - Hello World!

#include <stdio.h>

int main(int argc, char** argv)


{ print("Hello World!")
printf("Hello world!\n");
return 0;
}
C v/s Python - Hello World!

#include <stdio.h>

int main(int argc, char** argv)


{ from stdio import printf, ...
printf("Hello world!\n");
return 0;
}
C v/s Python - Hello World!

#include <stdio.h>

int main(int argc, char** argv)


{ Python ejecuta todo el contenido del archivo
printf("Hello world!\n");
return 0;
}
C v/s Python - Hello World!

#include <stdio.h>

int main(int argc, char** argv)


{ Python lo maneja por detrás
printf("Hello world!\n");
return 0;
}
C v/s Python - Hello World!

#include <stdio.h>

import sys
int main(int argc, char** argv)
{
argv = sys.argv
printf("Hello world!\n");
argc = len(argv)
return 0;
}
C v/s Python - Hello World!

#include <stdio.h>

int main(int argc, char** argv)


{ Python lo maneja por detrás
printf("Hello world!\n");
return 0;
}
C v/s Python - Hello World!

#include <stdio.h>

int main(int argc, char** argv)


{ Imprime "Hello world!\n" en consola
printf("Hello world!\n");
return 0;
}
¡Muchas Gracias!

With by @vichoeq & @KnowYourselves

También podría gustarte