Write a program that takes a 5 digit number and calculates 2
power
that number and prints it.
Answer / s.shanmugam24
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main(void)
{
int power,i;
i=2;
clrscr();
printf("enter the power values");
scanf("%d",&power);
i=pow(power);
printf("the power is",i);
}
Is This Answer Correct ? | 2 Yes | 9 No |
Is using exit() the same as using return?
how to find the binary of a number?
Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0
How can you tell whether a program was compiled using c versus c++?
Explain is it better to bitshift a value than to multiply by 2?
What's wrong with "char *p = malloc(10);" ?
Give the rules for variable declaration?
What is hashing in c language?
Write a C Program to display the following menu: Menu 1. Display 2. Copy 3. Append 4. Exit Accept the choice (1-4) from the user, and perform the following tasks: Choice 1: Accept a file name from the user and display the file on screen Choice 2: Accept two file names, and copy first file to the second Choice 3: Accept two file names, and append second file to the first file Choice 4: Terminate the program
1 Answers Accenture, Concor, DMU, Satyam, Syntel, Tora,
the data type used for unlimited value in c and how to do this program
What are the different types of linkage exist in c?
What is a #include preprocessor?