Answer Posted / vadivel t
2's compliment of a -ve no is, positive value of the same
no.
#include<stdio.h>
#include<conio.h>
void main()
{
int no1, res;
printf("ENTER THE NEGATIVE NO: \n");
scanf("%d", &no1);
no1 = ~(no1);
res = no1 | 0x01;
printf("\nRESULT: %d", res);
getch();
}
Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
Explain what is the benefit of using #define to declare a constant?
What is difference between array and structure in c?
What is pass by reference in c?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
Why cant I open a file by its explicit path?
What is meant by initialization and how we initialize a variable?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
int far *near * p; means
Can a void pointer point to a function?
Hi can anyone tell what is a start up code?
What is dynamic variable in c?
What is #include in c?
plz let me know how to become a telecom protocol tester. thank you.
What are the types of type qualifiers in c?
How can a program be made to print the line number where an error occurs?