Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1017639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:44:08+00:00 2026-05-16T10:44:08+00:00

can any one give me the dry output for this program? #include <stdio.h> main()

  • 0

can any one give me the dry output for this program?

#include <stdio.h>
main()
{
int a,b,c,d,e;
printf("Enter the Number to Find it's Reverse\n");
scanf("%d",&a);
while(a!=0)
{
b=a%10;
c=a/10;
printf("%d",b);
a=c;
}
getchar();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:44:08+00:00Added an answer on May 16, 2026 at 10:44 am

    Assuming that from dry output you mean explanation of the code, here is my attempt at it.

    Suppose user enters 143. So now a = 143.

    while( a != 0 )  // a = 143 therefor condition is true and the block of
                     // code inside the loop is executed.
    b =  a % 10 ;  // 143 % 10  ( The remainder is 3 )
    

    So value of b is printed on screen

    3

    Now

    c = a / 10 ;  // 143 / 10 =  14  
    a = c ;       // so now a = 14
    

    Once again, we return to the while()

    while( a != 0 )  // a = 14 therefor condition is true and the block of
                     // code inside the loop is executed.
    b =  a % 10 ;  // 14 % 10  ( The remainder is 4 )
    

    So value of b is printed on screen, which already has 3

    34

    Now

    c = a / 10 ;  // 14 / 10 =  1
    a = c ;       // so now a = 1
    

    Again, we return to the while()

    while( a != 0 )  // a = 1 therefor condition is true and the block of
                     // code inside the loop is executed.
    b =  a % 10 ;  // 1 % 10  ( its output will be 1 )
    

    So value of b is printed on screen which already has 34

    341

    Now

    c = a / 10 ;  // 1 / 10 =  0
    a = c ;       // so now a = 0
    

    We return to the while()

    while( a != 0 )  // a = 0 therefor condition is FALSE and the block of
                     // code inside the loop is NOT executed.
    

    Hope it was helpful.
    Note
    Instead of

    c=a/10;
    a=c;
    

    You can simply write

    a /= 10
    

    Secondly,

    int a,b,c,d,e;
    

    What is the purpose of e?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can any one give me java code to the below emulator images needs? The
Can any one give me the difference between Itemsource and DataContext of Listview in
Can any one give me a sample code that gets the selected value from
Can any one give me the syntax to truncate a table in IBM DB2.
Can any one give me an example of how to properly use STDERR_FILENO from
Can anyone explain the below code can any one give some real time explanation
Can any one give the dimension for the image without cropping that are used
can any one give an idea how google pick search results with no time(80ms
what is relation between container class and template in C++, Can any one give
I have got the xml from the Http Response, can any one give me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.