Advertisements

Q.

Given the following code fragment:

	main()
	{
		int row[20],i,sum=0;
		int *p=row;
		for(i=0;i<20;i++)
			*(p+i)=1;
		for(i=0;i<20;i+=sizeof(int))
			sum+=*(p+i);
		printf("sum=%d\n",sum);
	}
	

What will be the result of execution?

A sum=10
B sum=40
C sum=60
D sum=190
Answer & Explanation
Option: [A]

Random GK Questions

A vegetative bud
B fruit
C inflorescence
D condensed flower

View Answer

A Who pays the Tax?
B How Taxes can be shifted?
C Who bears the burden of Tax?
D Who transfers the Tax burden?

View Answer

A Adult franchise
B Limited suffrage
C single transferable vote
D Proportional representation

View Answer

A 18th August, 2013
B 5th August, 2013
C 26th August, 2013
D 23rd August, 2013

View Answer

Your Valuable Comments Please...

Advertisements

Useful Computer Science EBooks