write a program to display reverse of a number using for
loop?

Answer Posted / radhika

#include <stdio.h>
int main(void) {
int num[4], i;
printf("Enter the number :
");
printf("The reverse number is :
");
for(i = 4;i >= 0; i--) {
printf("%d",i);
printf("
");
}
return 0;
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is printf a keyword?

772


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2733


What is volatile variable in c?

666


What is the use of pragma in embedded c?

597


What are the 4 types of programming language?

599






what are the advantages of a macro over a function?

656


How can you increase the size of a dynamically allocated array?

655


What are the benefits of organizational structure?

583


What are lookup tables in c?

554


What is the significance of scope resolution operator?

870


Can you please explain the difference between strcpy() and memcpy() function?

614


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

675


How do you define structure?

577


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

635


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

777