write a C program, given number is double without using addt
ion and multiplication operator?ex:n=6,ans=12,pls send me ans
to goviseenu@gmail.com

Answer Posted / sandeep

#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter a floating point value");
scanf("%f",&num);
printf("Given no is %f and twice of number is %f"num,num-(-num));
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

2802


What are the restrictions of a modulus operator?

638


What is array in C

710


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

1768


What are the rules for the identifier?

673






what is use of malloc and calloc?

1386


what is bit rate & baud rate? plz give wave forms

1519


How can I trap or ignore keyboard interrupts like control-c?

620


What is the difference between the expression “++a” and “a++”?

650


Explain how do you list a file’s date and time?

621


What is a stream?

651


How can I find out if there are characters available for reading?

647


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

700


What is identifier in c?

547


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

1727