Answer Posted / subhashini
#include<stdio.h>
#include<conio.h>
{
clrscr();
int i,sum,n;
printf("enter the number");
scanf("%d",&n);
while(n>=1)
{
i=n%2;
sum=sum*10+i;
n=n/2;
getch();
}
printf("the binary number is: %d",i)
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
Can you please explain the difference between strcpy() and memcpy() function?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
How do you determine the length of a string value that was stored in a variable?
What is meant by high-order and low-order bytes?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What does double pointer mean in c?
What is bubble sort in c?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
How many header files are in c?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
With the help of using classes, write a program to add two numbers.
I have seen function declarations that look like this
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What do you mean by c what are the main characteristics of c language?