Answer:
The ouput of the given code is :
22
is "Tom's age.
Explanation:
Here in this code the variable user_name and user_age are initialized to "Tom" and 22 respectively as statement is given in the question i.e cout << user_age << " \nis " + user_name << "'s age.";.This line will print the user_age i.e 22 after that the control moves to the next line and print is "Tom's age.
Following are the code in c++
#include <iostream> // header file
#include <string>
using namespace std;
int main() // main function
{
string user_name="Tom";
int user_age= 22;
cout << user_age << " \nis " + user_name << "'s age.";
return 0;
}
Output:
22
is "Tom's age.
You take each digit, multiply it by the corresponding power of 16.
So 68 can be written as 6*16^1 + 8*16^0 = 6*16 + 8 = 104.
If the digit is a letter a-f, you substitute decimal 10-15 for it.
Answer:
The correct option for the given question is option(B) i.e dot operator
Explanation:
Structure are collection of different datatypes member element .
Let us consider the example of structure
Struct test
{
int age ;
char name[45];
};
Here test is an "structure" which member is age of "integer" type and name of "String" type.if we have to access the member of structure,firstly we create structure variable name then after that we use dot operator which is also known as member access operator that access the members of structure.
struct test op;// structure variable name
op.age=12; // access the member age
For example
Following is the code in c language :
#include <stdio.h> // header file
struct test // structure declaration
{
int age ;
char name[45];
};
int main() // main function
{
struct test op;// structure variable name
op.age=12; // access the member age
printf("%d",op.age);
return 0;
}
Output:12
so correct answer is "dot operator"
If you pin the tab it dramatically lowers usage