engineering questions

No Comments

33. Predict the output or error(s) of the following c code

1
2
3
4
5
6
7
8
9
10
11
 main()
{
	static char names[5][20]={"pascal","ada","cobol","fortran","perl"};
	int i;
	char *t;
	t=names[3];
	names[3]=names[4];
	names[4]=t;	
	for (i=0;i<=4;i++)
		printf("%s",names[i]);
}