Well, it is safe to turn a computer on without a RAM, but you can't really do it. RAM is one of the essential components in computers without which you can't really use a computer. You can turn it on, however, nothing will appear on your screen and the system won't boot. So, technically, it is safe, but it won't do anything to your computer as it cannot run without RAM.
Answer: The difference between the scope and linkage is as follows:-
- Scope of the variable is defined as the variable view from different program parts whereas the linkage is described as the link that is made between the variable and the declaration function having the common name.
- Scope of variable describes about the existing time of the variable in the program whereas linkage is defined for the name of variable present in the program is available at all time .
Answer:
misspelling a programming language word
Explanation:
Syntax error is the type of error in programming, when the programmer insert some symbol that is not present in directories or libraries, the programmer not followed the rules of that particular programming language that is understandable to compiler.
For example in C++, it is necessary to insert the semicolon (;) after each statement. If the programmer not insert the semicolon after each statement, the program will show the syntax error.
If the programmer use integer instead of int to assign datatype to the variable in C++, it will also leads to the syntax error. Because in C++ library, Integer is defined with the help of "int".
Answer:
Explain Operating System working: OS works as an intermediate between the user and computer. It helps the user to communicate with the computer without knowing how to speak the computer's language. The kernel is the central component of a computer operating systems.
Explanation:
Answer:
Explanation:
1. Write a program that declares an array named alpha with 50 components of the type double. Initialize the array so that the first 25 components are equal to the square of the counter (or index) variable and the last 25 components are equal to three times the index variable.
double alpha[50];
for (int i=0;i<25;i++)
{
alpha[i]=i*i;
alpha[i+25]=(i+25)*3;
}
2. Output the array so that exactly ten elements per line are printed.
for (int i=0;i<50;i++)
{
cout<<i+1<<". "<<alpha[i]<<" ";
if (((i+1)%10)==0)
{
cout<<endl;
}
}
3. Run your program again, but this time change the code so that the array is filled with random numbers between 1 and 100.
double alpha[50];
for (int i=0;i<50;i++)
{
alpha[i]=rand()%101;
}
for (int i=0;i<50;i++)
{
cout<<i+1<<". "<<alpha[i]<<" ";
if (((i+1)%10)==0)
{
cout<<endl;
}
}
4. Write the code that computes and prints the average of elements of the array.
double alpha[50],temp=0;
for (int i=0;i<50;i++)
{
alpha[i]=rand()%101;
temp+=alpha[i];
}
cout<<"Average :"<<(temp/50);
5. Write the code that that prints out how many of the elements are EXACTLY equal to 100.
double alpha[50],temp=0;
for (int i=0;i<50;i++)
{
alpha[i]=rand()%101;
if(alpha[i]==100)
{
temp++;
}
}
cout<<"Elements Exacctly 100 :"<<temp;
Please note: If you put each of above code to the place below comment it will run perfectly after compiling
#include <iostream>
using namespace std;
int main()
{
// If you put each of above code here it will run perfectly after compiling
return 0;
}