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
Differentiate Source Codes from Object Codes
What are variables c?
What is the advantage of an array over individual variables?
What is this pointer in c plus plus?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
Why do we use return in c?
What is difference between structure and union in c programming?
What is a volatile keyword in c?
What are the different categories of functions in c?
What is a dynamic array in c?
what are the advantages of a macro over a function?
Write a program that accept anumber in words
Write a program to swap two numbers without using third variable?
What is sizeof in c?
How many keywords are there in c?