Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
255 B
1
Indexable
Never
#include <stdio.h>

int main(){
	
	int n, i = 0;
	
	printf("Enter the value of n:" );
	scanf("%d", &n);
	
	int *ptr;
	
	ptr = (int*) malloc(n * sizeof(int));
	
	for ( i = 0; i < n; i++){
		printf("%d\n", ptr + i);
	}
	
	
	
	return 0;
}