-
Accept an amount in rupees (indian currency ) from the user...
....and find the minimum number of notes to form that amount.
The denominations are 500,100,50,20,10,5,2,1 Rupee.
using any loop!! -
-
-
C program to find 2 Digit Number
Write a program in C to find the 2 digit number which is 3 times its sum of its digits.
-
Sequence of Function Execution
printf("%d%d",f1(),f2());What is the sequence of function execution of the above statement. 1. printf, f1(), f2()2. printf, f2(), f1()3. f1(), f2(), printf4. f2(), f1(), printf.
-
-
}
">Vii)7. main(){ int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m);}
0 0 1 3 1Explanation :Logical operations always give a result of 1 or 0 . And also the logical AND (&&) operator has higher priority over the logical OR (||) operator. So the expression ‘i++ && j++ && k++’ is executed first. The result of this expression is 0 (-1 && -1 && 0 = 0). Now the expression is 0 || 2 which evaluates to 1 (because OR operator always gives 1 except for ‘0 || 0’ combination-...
-
Reallocating memory
When reallocating memory if any other pointers point into same piece of memory do you have to readjust these pointers or do they get readjusted automatically?
-
-
What is an lvalue?
An lvalue is an expression to which a value can be assigned. The lvalue expression is located on the left side of an assignment statement, whereas an rvalue is located on the right side of an assignment statement. Each assignment statement must have an lvalue and an rvalue. The lvalue expression must reference a storable variable in memory. It cannot be a constant.
-
-
Which one of the following is NOT a default promotion?
1) If either operand of an arithmetic operator is unsigned long, the other operand is promoted to unsigned long. 2) If either operand of an arithmetic operator is unsigned int, the other operand is promoted to unsigned int. 3) If either operand of an arithmetic operator is int, the other operand is promoted to int. 4) If either operand of an arithmetic operator is double, the other operand...
-
-
What is a pointer value and address?
A pointer value is a data object that refers to a memory location. Each memory locaion is numbered in the memory.The number attached to a memory location is called the address of the location.
C Interview Questions
Ans