summaryrefslogtreecommitdiffstats
path: root/src/examples/lab4test1.c
blob: f64a0667208254bd07dfe79f2848f767427daf3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <syscall.h>

//compile it, copy to the pintos virtual disk an call this program with arguments using the command
// pintos --qemu -- run 'lab4test1 arg1 arg2 arg3'
//if lab 4 is correctly implemented the arguments should be printed to the console
// try it wih different arguments and different number of arguments

int
main (int argc, char *argv[])
{

  for(int i=0;i<argc;i++)
	{
	printf("Parameter: %d: %s \n",i,argv[i];
	}

  return EXIT_SUCCESS;
}