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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #define size in c?

648


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

594


What are types of functions?

567


Can I initialize unions?

594


Explain what’s a signal? Explain what do I use signals for?

613






When is a null pointer used?

641


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

1777


What is the process to create increment and decrement stamen in c?

588


Are global variables static in c?

676


What is structure and union in c?

603


What is the difference between scanf and fscanf?

664


define string ?

669


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1128


What is data structure in c programming?

574


how to introdu5ce my self in serco

1522