4) Write a program that takes a 5 digit number and
calculates 2 power
that number and prints it.
Answer Posted / deepshree sinha
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int n,m
printf("enter any five digit number");
scanf("%d ",&n);
m=pow(2,n);
printf("m=%d",m);
getch();
}
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
Why #include is used in c language?
Which is best book for data structures in c?
What is the difference between c &c++?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
What is the purpose of void pointer?
why we wont use '&' sing in aceesing the string using scanf
Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer
please give me some tips for the placement in the TCS.
Explain how do you convert strings to numbers in c?
What is storage class?
Is python a c language?
Between macros and functions,which is better to use and why?
Explain what is the advantage of a random access file?
What are the data types present in c?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?