write a program for 7*8 = 56 ? without using * multiply
operator ? output = 56

Answer Posted / rama krishna sidhartha

Here is the logic.
void func()
{
int i;
int result = 0;
for(i = 0; i < 8; i++)
{
result = result + 7;
}
printf("%d",result);
}

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of getch ()?

648


Explain heap and queue.

593


What is static identifier?

712


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

1582


What is static function in c?

641






What are the 3 types of structures?

582


Are the outer parentheses in return statements really optional?

584


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

1886


Explain what is the difference between the expression '++a' and 'a++'?

635


Tell me what is null pointer in c?

621


What does printf does?

757


If the size of int data type is two bytes, what is the range of signed int data type?

601


Define Array of pointers.

644


Tell me is null always defined as 0(zero)?

683


Explain how can type-insensitive macros be created?

581