Write a program that takes a 5 digit number and calculates
2 power
that number and prints it.

Answers were Sorted based on User's Feedback



Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / sushant shrivastava

include<math.h>
include<stdio.h>


int main()
{
int i,num;

printf("Enter the value of i");
scanf("%d",&i)

num=POW(i,2);

printf("%d%d",num);

}

Is This Answer Correct ?    4 Yes 0 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / kbhargava.ygl

dont know..tell someeone if u know it

Is This Answer Correct ?    2 Yes 0 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / 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

Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / usha

#include<stdio.h>

void main()
{
unsigned long int s=1;

int n;
scanf("%d%d",&n);


for(int i=0; i<n; i++)
{
s=s*2;
}


printf("result %ld",s);
getch();
}

Is This Answer Correct ?    1 Yes 3 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / akshay

#include<stdio.h>
#include<conio.h>
//Develo0ed by Akshay p.Joy
void main()
{
unsigned long int a,s=1;

int i,j,k,l,m,n;
scanf("%d%d",&m);


for(i=0;i<2;++i)
{
s=s*m;
}


printf("result %ld",s);
getch();
}

Is This Answer Correct ?    5 Yes 11 No

Post New Answer

More C Interview Questions

Do you have any idea about the use of "auto" keyword?

0 Answers  


What is the heap?

0 Answers  


Is it better to use a macro or a function?

0 Answers  


What is include directive in c?

0 Answers  


What is a function simple definition?

0 Answers  






Predict the output or error(s) for the following: 25. main() { printf("%p",main); }

3 Answers   Google, ME,


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

0 Answers  


while initialization of two dimensional arrays we can initialize like a[][2] but why not a[2][] is there any reason behind this?

4 Answers   Aptech,


Write a c program to enter a string of paragraph and replacing a particular word which is repeated in the paragraph by another word?

2 Answers   ME, Synfusion, Wipro,


what does static variable mean?

0 Answers   TCS,


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

0 Answers   TCS,


What are the types of pointers?

0 Answers  


Categories