Bluetooth connection data on nonvolatile storage media such as a USB
Answer:
Line number 7.
Explanation:
If I am not wrong, the first line in this question would be #include<iostream>. That is used to add input and output stream of the program.
if we look at the line 1,2,3. These are just the packages/definition required to start a program.
Line 4 starts the main program and line 5 starts the block of main program. The block ends at line 10. So ,there should be no error in line 4,5 and 10.
If we look at line 6, we can see a constant integer(const int MY_VAL = 77) definition and initialization.
The main problem is, you cannot assign a value to a constant (MY_VAL) except during initializing stage.
Therefore, the line 6 is also true. However, this program is further trying to assign a value to constant at line 7. Therefore, the compiler will throw error (ERROR; assigning to const value).
<u>Explanation:</u>
Hey there! you need not to panic about it ,your program didn't have Driver program i.e main program! the correct & working code is given below:
// C++ program to count even digits in a given number .
#include <iostream>
using namespace std;
// Function to count digits
int countEven(int n)
{
int even_count = 0;
while (n > 0)
{
int rem = n % 10;
if (rem % 2 == 0)
even_count++;
n = n / 10;
}
cout << "Even count : "
<< even_count;
if (even_count % 2 == 0 )
return 1;
else
return 0;
}
// Driver Code
int main()
{
int n;
std::cin >>n;
int t = countEven(n);
return 0;
}
On windows:
1. Right-click on an empty section of your Windows desktop.
2. Click the "Screen Resolution" option that appears in the list.
3. View the numbers shown next to the "Resolution:" heading on this screen. The first number is the number of horizontal pixels Windows is trying to display. The second number is the number of vertical pixels. If you see a "(Recommended)" label after this number, it is because Windows believes this screen resolution is the best one available to match your monitor or display.
mac: Click on Apple icon on left top.
About This Mac --> More Info... --> Display
You should see the resolution there.
iphone: http://www.whatismyscreenresolution.com/
android: same as iphone
Answer:
Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}
H(X)=5.4224 bits per symb
H(X|Y="not C")=0.54902 bits per symb
Explanation:
P(B)=2P(C)
P(A)=2P(B)
But
P(A)+P(B)+P(C)=1
4P(C)+2P(C)+P(C)=1
P(C)=1/7
Then
P(A)=4/7
P(B)=2/7
Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}
iii
If X={A,B,C}
and P(Xi)={4/7,2/7,1/7}
where Id =logarithm to base 2
Entropy, H(X)=-{P(A) Id P(A) +P(B) Id P(B) + P(C) Id P(C)}
=-{(1/7)Id1/7 +(2/7)Id(2/7) +(4/7)Id(4/7)}
=5.4224 bits per symb
if P(C) =0
P(A)=2P(B)
P(B)=1/3
P(A)=2/3
H(X|Y="not C")= -(1/3)Id(I/3) -(2/3)Id(2/3)
=0.54902 bits per symb