write a c++ code that receives an integer number and display
the sum of the number and its revers integer?



write a c++ code that receives an integer number and display the sum of the number and its revers i..

Answer / Neha Srivastava

```cppnint reverse(int n) {n int rev = 0;n while (n != 0) {n int digit = n % 10;n rev = rev * 10 + digit;n n /= 10;n }n return rev;n}nvoid main() {n int num, sum;n cout << "Enter an integer: ";n cin >> num;n sum = num + reverse(num);n cout << "Sum of the number and its reversed integer is: " << sum;n}n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Electrical Engineering Interview Questions

why transformer rating in KVA ?

8 Answers   Bhel, TATA, Voltage,


where the lexical paramater will use in fron end?

1 Answers  


How to synchronization will be done between two DGs ?

1 Answers  


4.In which type of welding is a pool of molten metal used.....

3 Answers   ISRO, SSC, Vizag Steel,


how to calculate the starting current of a motor? gopal

3 Answers   JIPT,


160 kw motor running use 2R* 150 SQ mm cable

0 Answers   ID,


what happen if i change the polarity of ac when it is connected with motor

3 Answers  


for a 5hp motor to operate from 100kva generator ,what size of cable required in sqmm.

2 Answers   DSC, Indraprastha Gas Limited IGL, UltraTech,


From what on-site components does the HT panel monitoring the bus-bars in a 11kV system take inputs?

1 Answers  


what happen ehen synchronisation is done at below rated speed

1 Answers  


What current flows in the transformer primary when its secondary is open?

1 Answers  


I am in last year of Engineering.I want to apply for ONGC on GATE based score.They require Certificate of Competency as Electrical Supervisor.How can i get this certificate so I can apply for AEE(ELECTRICAL) in 2016

1 Answers   ONGC,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)