Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
dynamic memory allocation.c
//gcc 5.4.0 #include <stdio.h> int main() { int *marks; int i,n; printf("please enter the number of students: "); scanf("%d",&n); //now allocate memory marks=(int *) malloc(sizeof(int) * n); printf("enter the marks for each student: \n"); for(i=0; i<n; i++) { scanf("%d",&marks[i]); } printf("now here you can see the values: \n"); //now print the marks array for(i=0; i<n; i++) { printf("%d\n",marks[i]); } return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
eliminate_duplicates.c
bitmask
120465-11.1-3E
Sumit
new
22nd HW Switchv0.24
2017_1117_TARTAGLIA
Lab 5 HW Spring 2017 v0.5
Is const really const?
Lab6 v1.1 Sin,cos,tan,cot
Please log in to post a comment.