adspace


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

In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1307


swap 2 numbers without using third variable?

1217


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2522


What is dynamic dispatch in c++?

1142


`write a program to display the recomended action depends on a color of trafic light using nested if statments

2218


What is variable initialization and why is it important?

1404


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2836


In C programming, how do you insert quote characters (‘ and “) into the output screen?

1625


develop algorithms to add polynomials (i) in one variable

2269


write a progrmm in c language take user interface generate table using for loop?

2129


write a program to find out prime number using sieve case?

2182


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

2406


Explain the difference between null pointer and void pointer.

1165


How do you determine the length of a string value that was stored in a variable?

1209


What are pointers? What are different types of pointers?

1276