Write a program that takes a 5 digit number and calculates
2 power
that number and prints it.
Answer Posted / anusha
#include<stdio.h>
#include<conio.h>
main()
{
unsigned long integer n;
long integer res=1;
int i=1;
clrscr()
printf("please enter 5 digit no:");
scanf("%ld",&n);
for(i=1,i<=n,i++);
{
res=(res*2);
}
printf("Result is %ld",res);
getch();
}
Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What is 'bus error'?
What is an lvalue?
What is the difference between call by value and call by reference in c?
What are the features of c languages?
What is the purpose of main( ) in c language?
Explain what is meant by high-order and low-order bytes?
With the help of using classes, write a program to add two numbers.
What are extern variables in c?
What is difference between structure and union in c programming?
I need testPalindrome and removeSpace
#include
What are the difference between a free-standing and a hosted environment?
What is the scope of global variable in c?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
Is a house a mass structure?
What is structure in c definition?