ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C++ >> C++ General
 
 


 

 
 STL interview questions  STL Interview Questions (91)
 OOPS interview questions  OOPS Interview Questions (558)
 C++ General interview questions  C++ General Interview Questions (458)
Question
How many bit combinations are there in a byte?
 Question Submitted By :: C++-General
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
There'll actually be 256 combinations. The maximum value
that can be represented with a byte (8 - bits) is 255 but as
far as combinations are concerned 0 should also be
considered as well as 1, 2, 3, ..., 255. So there are total
256 combinations.
 
Is This Answer Correct ?    84 Yes 7 No
Abdullah Javid
 
Answer
# 2
it is 2^8
means 2 ^ no of bits
means 256....
:)
 
Is This Answer Correct ?    17 Yes 3 No
Vaibhav Meena
 
 
 
Answer
# 3
There are 256 combinations as 00000000 is classed a one
combination. plus the other 255 combinations. Answer 8 is
wrong.Answer 2 is correct.
 
Is This Answer Correct ?    15 Yes 2 No
Azza
 
Answer
# 4
256 combinations.Byte contains the 8 Bits and bit contains
either the value 0 or 1.i.e.(2 raise to power 8 minus
1).The maximum number of value represented with a byte is 8
bits is 255 but 0 should also be considered as well as 1,
2, 3, ..., 255. So there are total
256 combinations.
 
Is This Answer Correct ?    12 Yes 4 No
Santosh Shah
 
Answer
# 5
This has to be the easiest technical question for any
programmer...

A Byte is made of 8 Bits, so the number of combination for
Byte would be 2^8.

However, if asked the maximum number represented then it
would be (2^8)-1.

Surely, if you can't answer this you should seriously think
about changing your profession.
 
Is This Answer Correct ?    5 Yes 0 No
Arjun
 
Answer
# 6
2 pow 8 combinations =256

Arjun is right
 
Is This Answer Correct ?    3 Yes 0 No
Manoj
 
Answer
# 7
=2^8-1
=256-1
=255
bco'z only 8 bit data can be loaded that depends on the
address lines we take
 
Is This Answer Correct ?    0 Yes 6 No
K.kishorebabu
 
Answer
# 8
ya they r right. 
Is This Answer Correct ?    5 Yes 12 No
Krishna
 
Answer
# 9
if number of bite values is n, and length of the byte is k.
that means n = 2, k = 8.
for n even => n^k
(2^8 = 256)
for n odd => n^k - 1
(2^7 - 1 = 128-1 = 127)
 
Is This Answer Correct ?    5 Yes 12 No
Panaitsdv
 
Answer
# 10
2 raise to no. of byte ie. for three byte ,8 bit combination 
Is This Answer Correct ?    4 Yes 13 No
Bari
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
Why did you leave your last job?   2
What are function poinetrs? where are they used? CTS 1
How to construct muliton object Symphony 2
Why preincrement operator is faster than postincrement?   5
What is Memory Alignment? TCS 2
How to write a program such that it will delete itself after exectution?   3
give me some class & objects examples?   1
Find out the bug in this code,because of that this code will not compile....... #include <iostream> #include <new> #include <cstring> using namespace std; class balance { double cur_bal; char name[80]; public: balance(double n, char *s) { cur_bal = n; strcpy(name, s); } ~balance() { cout << "Destructing "; cout << name << "\n"; } void set(double n, char *s) { cur_bal = n; strcpy(name, s); } void get_bal(double &n, char *s) { n = cur_bal; strcpy(s, name); } }; int main() { balance *p; char s[80]; double n; int i; try { p = new balance [3]; // allocate entire array } catch (bad_alloc xa) { cout << "Allocation Failure\n"; return 1; } Impetus 2
Why do C++ compilers need name mangling? Lucent 3
Write any small program that will compile in "C" but not in "C++"?   4
why c++ is not called strictly d super set of c? Satyam 3
if there is binary tree which one is the easiest way to delete all child node? Persistent 1
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com