Answer:
Reference
Explanation:
The Reference type variable is such type of variable in C# that holds the reference of memory address instead of value. Examples for reference type are classes, interfaces, delegates and arrays.
We can pass parameters to the method by reference using <em>ref </em>keyword
It’s mandatory to initialize the variable value before we pass it as an argument to the method in c#
For example,
int x = 10; // Variable need to be initialized
Add(ref x); // method call
If you pass parameters by reference in method definition, any changes made to it affect the other variable in method call.
Here's a sample program:
using System;
namespace ConsoleApplication
{
public class Test
{
public static void Main()
{
int i = 10;
Console.WriteLine("i=" + i);
Add(ref i);
Console.WriteLine("i=" + i);
Console.ReadLine();
}
public static void Add( ref int j)
{
j = j + 10;
Console.WriteLine("j="+j);
}
}
}
Output:
i=10
j=20
i=20
Answer:
"Virtual reality" is the appropriate answer.
Explanation:
The utilization of technological advances gives the impression of a 3D interactive environment wherein the things that have such a perception of space embodiment or involvement, are considered as Virtual reality.
Virtual reality implementations often include:
- Entertainment,
- Medical and
- Educational activities.
No it is not because village school is the traditional education
#include <iostream>
#include <string>
using namespace std;
int main() {
string userInput;
cout << "Enter word" << endl;
cin >> userInput;
cout << "you entered" << endl;
cout << userInput;
return 0;
}
Answer:
//variable integer_list to hold a list of integers
DECLARE integer_list
ASSIGN values to integer_list
//variable sum to hold the sum of the elements in the list
DECLARE sum
ASSIGN zero to sum
//loop through the integer_list and sum all it's elements together.
for(int i=0; i<integer_list.size(); i++){
sum += interger_list.get(i)
}
//Show the result of the addition from the for loop
DISPLAY "The sum is " + sum
Explanation:
The above code uses some hypothetical programming language syntax. The second and third lines declare an arbitrary integer list and assign a set of values to it respectively.
The fifth line declares a variable "sum" which will hold the result of summing all the elements in the list. The sixth line initializes "sum" to zero.
The for loop shown iterates through the integer list cumulatively summing its elements.
The result is displayed as written on line 12.
Hope it helps!