convert 12345 to 54321 withoutusing strig

Answer Posted / pavan kumar b n

By making use of stack data structure.... i.e., first push
all the numbers and then pop them .. since stack is LIFO
order , the numbers get reversed....

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

680


Where can I get an ansi-compatible lint?

634


Write programs for String Reversal & Palindrome check

592


If you know then define #pragma?

668


When should a type cast be used?

571






I have a varargs function which accepts a float parameter?

567


Differentiate call by value and call by reference?

558


What is the difference between text and binary modes?

637


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

755


What is c token?

597


What is #include in c?

590


What type of function is main ()?

576


Explain how can I convert a number to a string?

636


Why enum is used in c?

513


Explain how do you sort filenames in a directory?

594