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

design and implement a program that reads floating-points numbers in a sentinel-controlled loop until the user terminates the program by entering zero.your program should determinate and print the smallest,largest and average of the supplied numbers.

2 Answers  


What is the difference between far and near ?

0 Answers  


write a program for 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 4 4

1 Answers  


Write a program of advanced Fibonacci series.

0 Answers   Aspiring Minds,


write a own function for strstr

1 Answers   LG Soft,






How can I avoid the abort, retry, fail messages?

0 Answers  


Explain the difference between malloc() and calloc() function?

0 Answers  


any string of bits of length 'n' represents a unique non- negative integer between.............?

2 Answers  


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.

0 Answers   Amazon,


Can a void pointer point to a function?

0 Answers  


Does * p ++ increment p or what it points to?

0 Answers  


Explain high-order and low-order bytes.

0 Answers  


Categories