what is macro in c?
Difference between single linked list & double linked list
what is fifo & lifo?
what is stack & queue?
Answers were Sorted based on User's Feedback
Answer / nilam
Macros are preprocessor directives that are defined using #define directive. Macros consist of two parts Macro_Name, & Macro_Substitution_Text.
Before the source code gets complied, the preprocessor will check for the presence of macros. & wherever it found that macro simply replaces that macros with substitution text.
Macros are not Type Safe.
Is This Answer Correct ? | 21 Yes | 0 No |
Answer / revathi
stack is a last in, first out (LIFO).It is characterized by only three fundamental operations: push, pop and stack top.
The queue is a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the queue will be the first one to be removed.
Is This Answer Correct ? | 7 Yes | 1 No |
Given an int variable n that has been initialized to a positive value and, in addition, int variables k and total that have already been declared, use a do...while loop to compute the sum of the cubes of the first n whole numbers, and store this value in total . Thus if n equals 4, your code should put 1*1*1 + 2*2*2 + 3*3*3 + 4*4*4 into total . Use no variables other than n , k , and total .
write the value of x and y after execution of the statements: int x=19,y; y=x++ + ++x; x++; y++;
What is the out put of this programme? int a,b,c,d; printf("Enter Number!\n"); scanf("%d",&a); while(a=!0) { printf("Enter numbers/n"); scanf("%d%d%d",&b,&c,&d); a=a*b*c*d; } printf("thanks!"); getche(); Entering numbers are a=1,b=2,c=3,d=4 b=3,c=4,d=-5 b=3,c=4,d=0
I'm having trouble with coming up with the correct code. Do I need to put a loop? Please let me know if I'm on the right track and what areas I need to correct. I still don't have a good grasp on this programming stuff. Thanks =) The assignment was to write a program using string functions that accepts a coded value of an item and displays its equivalent tag price. The base of the keys: 0 1 2 3 4 5 6 7 8 9 X C O M P U T E R S Sample I/O Dialogue: Enter coded value: TR.XX Tag Price : 68.00
Assume that the int variables i and j have been declared, and that n has been declared and initialized. Write code that causes a "triangle" of asterisks of size n to be output to the screen. Specifically, n lines should be printed out, the first consisting of a single asterisk, the second consisting of two asterisks, the third consistings of three, etc. The last line should consist of n asterisks. Thus, for example, if n has value 3, the output of your code should be * ** *** You should not output any space characters. Hint: Use a for loop nested inside another for loop.
what is the large sustained error signal that eventually cause the controller output to drive to its limit
char* f() return "hello:"; void main() {char *str=f(); }
how tally is useful?
What are the different types of errors in C and when they occur?
void main() { for(int i=0;i<5;i++); printf("%d",i); } What is the output?..
32 Answers College School Exams Tests, CTS, HCL, iGate, SmartData,
Given that two int variables, total and amount , have been declared, write a sequence of statements that: initializes total to 0 reads three values into amount , one at a time. After each value is read in to amount , it is added to the value in total (that is, total is incremented by the value in amount ). Instructor's notes: If you use a loop, it must be a for loop. And if you use a loop control variable for counting, you must declare it.
Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;