Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
función malloc()
#include <stdio.h> #include <stdlib.h> void poblar(int *, int); void mostrar(int *, int); int main(void) { int N; scanf("%d", &N); int *puntero; puntero = (int *) calloc ( N, sizeof(int)); if ( puntero == NULL ) exit(EXIT_FAILURE); // Manejo de excepciones. poblar(puntero, N); mostrar(puntero, N); return EXIT_SUCCESS; } void poblar(int *vector, int N) { int i; for ( i = 0 ; i < N ; i ++) scanf("%d", &vector[i]); } void mostrar(int *vector, int N) { int i; for ( i = 0 ; i < N ; i ++) printf("%d ", vector[i]); }
run
|
edit
|
history
|
help
0
Lab 11 v.05
TruncatablePrime
Spring 2017 Lab 4 v1.1
18BCE2182 MIDTERM PART-B ATOMIC
A_141121_mayorMenor
C Structs Example
a.c
EUCLIDES BIEN
Project 5 v.03
A_141121_factorial01