Answer Posted / bertilla
#include<conio.h>
#include<stdio.h>
void main()
{
int i,n,arr[15];
for(i=0;i<=14;i++){arr[i]=0;}
do
{
arr[i]=n%2;
n=n/2;
i--;
if(n==1){arr[i]=1;}
}while(n>1);
for(i=0;i<=15;i++)
{
printf("%d",arr[i]);
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
Explain indirection?
Array is an lvalue or not?
What is dynamic variable in c?
how to find binary of number?
What is a double c?
How would you rename a function in C?
Why header files are used?
Why can't I perform arithmetic on a void* pointer?
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
Explain what are preprocessor directives?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
Why malloc is faster than calloc?
How are Structure passing and returning implemented by the complier?
What are register variables? What are the advantage of using register variables?