Will it execute everywhere ?

Charudutta S. Palkar csp at gtenmc.UUCP
Sat Jul 28 10:15:02 AEST 1990


	This is to avoid the usage of varargs. The only restriction
	is to pass number of arguments as the first parameter.

	Will this piece of code execute irrespective of the order
	in which the parameters are pushed on the stack ie. right
	to left or left to right? This is executable on Unix V.3
	on a VAX-8000.

	void ftest(n)
	int n;
	{
	   char **p;
	   p = (char **)( &n + 1 );
	   while( n-- )
	      printf("%s",*p++);
	}
	
	main()
	{
	   ftest(2,"Rama ","Sita ");
	   ftest(4,"\n","Xxxx ","Sita ","\n");
	}



More information about the Comp.lang.c mailing list