|
INTERVIEW QUESTIONS
C++
INPUT AND OUTPUT OPERATIONS IN C++
DETAILS
Question: Bitwise Operations - Given inputs X, Y, Z and operations | and & (meaning bitwise OR and AND, respectively), what is output equal to in?
Answer: output = (X & Y) | (X & Z) | (Y & Z);<br><br>
|
|
|
Category |
Input and Output Operations in C++ Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6719 users |
Added on |
9/16/2014 |
Views |
71388 |
Rate it! |
|
|
Question:
Bitwise Operations - Given inputs X, Y, Z and operations | and & (meaning bitwise OR and AND, respectively), what is output equal to in?
Answer:
output = (X & Y) | (X & Z) | (Y & Z);<br><br> Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How to write a code for replacing a character with astrick sign?
|
View Answer
|
|
HOW TO READ TEXT FILE AND READ IT INTO ANOTHER TEXT FILE?
|
View Answer
|
|
Can we make any program in c++ without using any header file and what is the shortest program in c++.
|
View Answer
|
|
How to write c++ program to write a message to the screen?
|
View Answer
|
|
Why do we need to close a file. Eg. ifstream ifile; ifile.open("temp.dat") ..... ... ifile.close(); What happens if we do not close() a file?
|
..... ...< - Input and Output Operations in C++ Interview Questions & Answers">
View Answer
|
|
I was creating a program that has a 2 dimensional array with 25 elements.How can I display the highest row sum? lowest row sum? highest col sum? lowest row sum?
|
View Answer
|
|
Help me to write a c++ program using strings that does the following tasks 1)Removes multiple spaces between words. 2)find the longest word in a text. 3)extract the number of integers in the text. 4)extract the number of doubles.5)extract the number of words in a sentence.
|
View Answer
|
|
What is the output of printf ("%d")
|
- Input and Output Operations in C++ Interview Questions & Answers">
View Answer
|
|
What will be output of the following code #include using namespace std; class abc { public : void main() { cout<<" Its main function "< } }; int main(int c, char **v) { abc a; if(c<1) { cout<<" Error can not accept it "< exit(1); } cout<<" its in main program "< a.main();
return 0; }
|
View Answer
|
|
How do you write a program which produces its own source code as its output?
|
View Answer
|
|
Is it possible to have different access modifiers on the get/set methods of a property?
|
View Answer
|