Answer:
Data hierarchy is basically define to the data which is organized in the systematic manner. The main concept of the data hierarchy is to check the basic structure of the data. It basically involve the fields records and files for the data organization.
The following is the list of the computer data hierarchy from nit to address are:
1) Bit: It is the smallest unit of the data.
2) Field: The collection of all the characters in the data is known as field.
3) Record: The collection of the different fields is known as records.
4) File: The collection of various types of records in the database is known as file.
Answer:
The expressions in each part of an AND or OR expression use <u>Short Circuit</u> evaluation; that is, they are evaluated only as much as necessary to determine whether the entire expression is true or false.
Explanation:
Logic operations follow different type of evaluation methods that can be short circuit or open circuit evaluation. In short circuit evaluation if first operand of the expression is true or false in OR or AND operation respectively, the result will found as true or false without checking the second operand of the expression. This is called Short Circuit Evaluation.
In OR operation, If first operand is true it means that the result of the expression is true without knowing that the other operand is true or false. In AND operation, If the first operand is False, the result will found as False without knowing that whether the 2nd operand is true or false.
This Mechanism is called Short Circuit Evaluation.
Answer:
Explanation:
Algorithm design is the branch of discrete mathematics and computer science that deals with the research, development and implementation of sequential and asynchronous algorithms. ... An algorithm is simply a sequence of instructions; a recipe is an algorithm, and so is a list of driving instructions.
Answer:
# include <iostream.h>
# include <stdio.h>
# include <string.h>
using namespace std;
class citizen
{
int i;
public string name[30];
public long int phonenumber[30];
public void addindividual(string name1)
{
If (i<=30)
{ int flag=0;
for(int j=0; j<=i;j++)
{
if (strcmp(name[i], name1)
{
flag=1;
}
else
{
flag=0;
}
}
If (flag)
{
if (i<30)
{
for(j=i+1;j<=30; j++)
{
cout<<"Enter the name:"; getchar(name[j]);
cout<<"Enter the phone number:"; cin>>phonenumber[j];
i++;
}
else
{
cout<<"The person already exists";
exit();
}
}
else
{
cout<<"array is full:";
exit();
}
}
}
Void main()
{
string str;
cout<<" Enter name:";
getline(cin, str); ;
citizen c1=new citizen();
c1.addindividual(name1);
}
Explanation:
With a little more effort you can make the program allow the user to enter any number of details, but less than 30 overall. We have used here flag, and as a programmer we know why we use the Flag. It is used to check whether certain Boolean condition is fulfilled or not. Here, we are checking whether a given name is present in the array of names, and if it is not present, we add that to the list. And if the name is present, we print, it already exist.