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

A man has house old expenses 50% And 20& for transport & 15& other expenses & 240 for recreation what will his budgeted salary pla reply interview on 22 Aug 2011

2 Answers  


A secret can be told only 2 persons in 5 minutes .the same person tells to 2 more persons and so on . How long will take to tell it to 768 persons ?

20 Answers   Cognizant, CTS, DCE,


A sum of money becomes 2.5 times itself at 12.5% simple interest p.a. What should be the period of investment to get this much return?

0 Answers   Cap Gemini,


5.A and B invest Rs.200 and Rs.300 respectively in a business for a period of 3 years, respectively. Then the profit will be divided in the ratio

2 Answers   BirlaSoft,


Dear sir, I am giving Grade B entrance Exam this Oct 09 for RBI.Kindly guide me as to what book would be good to refer for general awareness for RBI. Rgds Gayathri

1 Answers  


There are two balls touching each other circumferentially. The radius of the big ball is 4 times the diameter of the small ball.The outer small ball rotates in anticlockwise direction circumferentially over the bigger one at the rate of 16 rev/sec. The bigger wheel also rotates anticlockwise at N rev/sec. what is 'N' for the horizontal line from the centre of small wheel always is horizontal.

0 Answers   Infosys,


please send me last ten year sample paper of clerkical of satate bank of india

0 Answers   State Bank Of India SBI,


A man leaves office daily at 7pm A driver with car comes from his home to pick him from office and bring back home One day he gets free at 5:30 and instead of waiting for driver he starts walking towards home. In the way he meets the car and returns home on car He reaches home 20 minutes earlier than usual. In how much time does the man reach home usually??

2 Answers   TCS, Verizon,


There are some houses in a street back to back. And they that house behind 10 were 23. How many houses in the street?

0 Answers   Accenture,


if for h hours of work the salary is s and the employee gets x hours of medical leave, then what is the salary/hr ?

0 Answers   TATA,


one question on: -=+,*=-,/=* etc then 10/5*45=?

5 Answers   Essar,


What is the calibration procedure for UV Spectrophotometer

2 Answers  


Categories