# HCL Language paper

Posted on :12-01-2016

Q1. What is the output of the following program?

void main()
{
int i,j,k;
for(i=0;i<3;i++)
k=sum(i,i);
printf(" %d",k);
getch();
}
sum(s,t)
{
static int m;
m+=s+t;
return m;

}

ANS: 6

Q2. What is the output of the following program?

void main()
{
int i;
clrscr();
for(i=1;i<6;++i)
switch(i)
{
case 1:
case 2: printf("%d,",i++);break;
case 3: continue;
case 4: printf("%d,",i);
}
printf("%d",i);
getch();
}

ANS: 1,4,6

Q3. Lucia is a wonderful grandmother. Her age is between 50 and 70. Each of her sons have as many sons as they have brothers. Their combined number gives Lucias age. What is the age?

ANS: 64

Q4. There are two towers A and B. Their heights are 200ft and 150ft respectively and the foot of the towers are 250ft apart. Two birds on top of each tower fly down with the same speed and meet at the same instant on the ground to pick a grain. What is the distance between the foot of tower A and the grain?

ANS: 90 ft

Q5. Raju having some coins want to distribute to his 5 son, 5 daughter and driver in a manner that, he gave fist coin to driver and 1/5 of remaining to first son he again gave one to driver and 1/5 to 2nd son and so on.... at last he equally distributed all the coins to 5 daughters. How many coins Raju initially have?

ANS: 881

Q6. There is a 5 digit number. 3 pairs of sum is eleven each. Last digit is 3 times the first one. 3 rd digit is 3 less than the second. 4 th digit is 4 more than the second one. Find the digit.

ANS: 25296.

Q7. 0, 2, 4, 6, 8, 12, 12, 20, 16, ____

ANS: 12

Q8. A tree on first day grows 1/2 of its size second day 1/3rd of its size on the previous day similarly than 1/4th and so on.u have to calculate after how many days the tree will be 100 times of its original size.

ANS: 198 days

Q9. A is an integer. Dividing 89 & 125 gives remainders 4 & 6 respectively. Find A?

ANS: 17

Q10. If there are 1024*1280 pixels on a screen and each pixel can have around 16 million colors. Find the memory required for this?

ANS: 4MB

FreshersLive - No.1 Job site in India. Here you can find latest 2018 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

 ✖