Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the logic
k=num%10;
sum=sum+k;
num=num/10;

Answers were Sorted based on User's Feedback



Explain the logic k=num%10; sum=sum+k; num=num/10; ..

Answer / rudrapathi

It is the logic for adding the digits of given number

for example no is 1234

output is 1+2+3+4=10

Is This Answer Correct ?    27 Yes 1 No

Explain the logic k=num%10; sum=sum+k; num=num/10; ..

Answer / bariki shanmukha[anantapuram,m

I wil take 3 variables such as,sum=0,k,num[IT REPRESENTS
GIVEN NUMBER BY THE USER].

itr1 itr2 itr3 itr4 itr5

k : - 4 3 2 1

sum: 0 4 7 9 10

num: 1234 123 12 1 0

like that exucution wil b starts which is above mentioned.

Is This Answer Correct ?    11 Yes 3 No

Explain the logic k=num%10; sum=sum+k; num=num/10; ..

Answer / cathie

reverse of a number

Is This Answer Correct ?    3 Yes 7 No

Post New Answer

More General Aptitude Interview Questions

In a club there are certain no. of males and females. If 15 females are absent then no. of males will be twice that of females. If 45 males are absent then female strength will be 5 times that of males. Find no. of males actually present.

0 Answers   Accenture,


fridge cost R Rs,cover value is 5,discount d% then its new cost

3 Answers   Wipro,


what is the sum of 7 consecutive odd numbers with 27 as the fourth number

0 Answers   TATA,


Plz help me to get Aptitute test questions for SBI Clerical exams.

0 Answers   State Bank Of India SBI,


Sunny ate 100 apples in five days, each day eating 6 more than the previous day. How many apples did he eat on the first day?

0 Answers   3i Infotech,


Find the next letter in the series A,C,F,J,0--

0 Answers   DSQ Software,


6 women can do 75 units of work in 8 days by working 5hrs/day. In how many days can 4 women do 30 units of work by working 8hrs/day ?

0 Answers   Hexaware,


who translated the novel NIL Darpan in English? a) Rabindranath Tagore b) Madhusudan Dutta C) Dinabandhu Mitra d) Bankim Chandra Chatterjee.

10 Answers   Sodexo, SSC,


for cube and sphere 3 views are similarly draw one such figure?

2 Answers   Geometric Software,


How much area in sqmt of 14 fit dia cirlce???

6 Answers   IBM,


Express 16 m/s into Km/hr

0 Answers   Axis Bank,


4 couples have a party.Depending on the set of statements,find who insulted whom and who is the host of the party.

0 Answers   Infosys,


Categories