Consider a language that does not have arrays but does have
stacks as a data type.and PUSH POP..are all defined .Show
how a one dimensional array can be implemented by using two
stacks.
Answer Posted / gingercpu
One to pop and the other to push. Have to maintain all the
elements. Index converted to the # of push and pop
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What are identifiers in c?
How can I find the modification date and time of a file?
Which is better between malloc and calloc?
What is the role of && operator in a program code?
How can I manipulate strings of multibyte characters?
What is #include cctype?
What is a char in c?
Write a program of advanced Fibonacci series.
What is the difference between near, far and huge pointers?
What 'lex' does?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
What is cohesion and coupling in c?
Explain how do you print an address?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Explain the difference between the local variable and global variable in c?