mplementation of stack using any programing language
Answer / aravind
1. stack as an array or linked list (two ways)
2.define array.
3.perform push operation by taking one more array.
4.perform pop and store the popped items
5.display function to print the popped values
6.make sure you reach LIFO
Is This Answer Correct ? | 3 Yes | 3 No |
Write a program in c to input a 5 digit number and print it in words.
What is a file descriptor in c?
Is c is a middle level language?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
What are the usage of pointer in c?
write a c program for greatest of three numbers without using if statment
int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[]
What is the difference between Printf(..) and sprint(...) ?
identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5;
Are pointers integer?
You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure.
how to set Nth bit of a variable?