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
Is printf a keyword?
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
What is volatile variable in c?
What is the use of pragma in embedded c?
What are the 4 types of programming language?
what are the advantages of a macro over a function?
How can you increase the size of a dynamically allocated array?
What are the benefits of organizational structure?
What are lookup tables in c?
What is the significance of scope resolution operator?
Can you please explain the difference between strcpy() and memcpy() function?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
How do you define structure?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
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