what is the use of ~ in c lang?????

Answers were Sorted based on User's Feedback



what is the use of ~ in c lang?????..

Answer / c.p.senthil

Agree with answer 2.
~ is used to find the 1's complement of any number
ex:
a = 0xCA (in hex) => 11001010 (in binary)
~a = 0x35 (in hex) => 00110101 (in binary)

Is This Answer Correct ?    5 Yes 0 No

what is the use of ~ in c lang?????..

Answer / bikash

~ is used to complement a hex value.
eg a = ~0x01;
//now a will have 0xFE;

Is This Answer Correct ?    2 Yes 0 No

what is the use of ~ in c lang?????..

Answer / guest

we r using this key word for equal and shine operator

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

State two uses of pointers in C?

0 Answers   Aspire, Infogain,


what is the difference between #include<stdio.h> and #include "stdio.h" ?

3 Answers  


What is wrong with this initialization?

0 Answers  


What is the difference between strcpy() and memcpy() function in c programming?

0 Answers  


How can this be legal c?

0 Answers  






What is difference between function overloading and operator overloading?

0 Answers  


What is c language and why we use it?

0 Answers  


What is difference between structure and union in c programming?

0 Answers  


Why preprocessor should come before source code?

2 Answers  


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

0 Answers  


Disadvantages of C language.

0 Answers   Impetus,


Explain can the sizeof operator be used to tell the size of an array passed to a function?

0 Answers  


Categories