Answer:
import java.util.Scanner;
public class ss11{
public static void main (String[]args) {
Scanner keyboard = new Scanner (System.in)
String a1, a2, a3, a4, a5;
int i1, i2, i3, i4, i5;
System.out.println("Enter a four bit binary number:");
a1= keyboard.next();
a2= a1.substring(0,1);
a3= a1.substring(1,2);
a4= a1.substring(2,3);
a5= a1.substring(3,4);
i1 = Integer.parseInt(a2);
i2 = Integer.parseInt(a3);
i3 = Integer.parseInt(a4);
i4 = Integer.parseInt(a5);
i1= i1 * 8;
i2= i1 * 4;
i3= i1 * 2;
i4= i1 * 1;
i5= i1+i2+i3+i4;
System.out.println("The converted decimal number is: +i5);
}
}
Explanation:
Answer:
See Explaination
Explanation:
#include <iostream>
#include <string.h>
using namespace std;
char *mixem(char *s1, char *s2);
int main() {
cout << mixem("abc", "123") << endl;
cout << mixem("def", "456") << endl;
return 0;
}
char *mixem(char *s1, char *s2) {
char *result = new char[1 + strlen(s1) + strlen(s2)];
char *p1 = s1;
char *p2 = s2;
char *p = result;
while (*p1 || *p2) {
if (*p1) {
*p = *p1;
p1++;
p++;
}
if (*p2) {
*p = *p2;
p2++;
p++;
}
}
*p = '\0';
return result;
}
Answer:
False
Explanation:
IPv4 address are composed of four octets (8 bit numbers), ranging from <em>0.0.0.0 to 255.255.255.255</em>
All those 32 bits, in decimal notation, can form a total of
different addresses.
Being more than 4 billion addresses and ignoring that some addressesare reserved for special uses, even present human population almost doubles that number.
So it is safe to state that IPv4 addresses is <u>not </u>enough to give every blade of grass its own IP.
Answer:
The given statement is False.
Explanation:
- Needs Met Rating of a result show us that how much the result is fulfilling the query of the user. The greater the needs met rating is, the greater the satisfaction of the user is.
- If a page has high quality then it can or can not be useful for the user.
- If the page has high quality as well as high needs met rating then it is best for the user.
- If the page has high quality and has low needs met rating that means it is not relevant to the query so not useful for the user.
- Thus, it is concluded that high quality pages in a task shouldn't all get the same needs met rating rating rather need met rating is dependent upon the relevancy and usefulness of the result to the need and query of the user.