Demo entry 3623996

eaasy

   

Submitted by anonymous on Feb 14, 2016 at 22:50
Language: C. Code size: 336 Bytes.

#include <stdio.h>

int main(int argc, char* argv[]){
	int N = 6;
	int X[] = {5,3,-6,19,8,12};
	int Y[] = {0,0,0,0,0,0};
	int *ptrX = X;
	int *ptrY = Y;

	for(N; N > 0; N--){
		*ptrY = *ptrX;
		ptrY++;
		ptrX++;
	}
	
	int i = 0;
	for(i = 0; i < 6; i++){
		printf("i = %d, Y[%d] = %d, X[%d] = %d\n", i,i,Y[i],i,X[i]);
	}
	return 0;
}
		

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).