No products in the cart.

Ask questions which are clear, concise and easy to understand.

Ask Question
  • 1 answers
Used to put a random value in given range Syntax: Random(upper limit - lower limit +1)+upper limit;
  • 0 answers
  • 0 answers
  • 0 answers
  • 1 answers

Sia ? 3 years, 5 months ago

Call By Value Call By Reference
While calling a function, we pass values of variables to it. Such functions are known as “Call By Values”. While calling a function, instead of passing the values of variables, we pass address of variables(location of variables) to the function known as “Call By References.
In this method, the value of each variable in calling function is copied into corresponding dummy variables of the called function. In this method, the address of actual variables in the calling function are copied into the dummy variables of the called function.
With this method, the changes made to the dummy variables in the called function have no effect on the values of actual variables in the calling function. With this method, using addresses we would have an access to the actual variables and hence we would be able to manipulate them.
<pre> // C program to illustrate // call by value #include // Function Prototype void swapx(int x, int y); // Main function int main() { int a = 10, b = 20; // Pass by Values swapx(a, b); printf("a=%d b=%d\n", a, b); return 0; } // Swap functions that swaps // two values void swapx(int x, int y) { int t; t = x; x = y; y = t; printf("x=%d y=%d\n", x, y); } Output: x=20 y=10 a=10 b=20 </pre> <pre> // C program to illustrate // Call by Reference #include // Function Prototype void swapx(int*, int*); // Main function int main() { int a = 10, b = 20; // Pass reference swapx(&a, &b); printf("a=%d b=%d\n", a, b); return 0; } // Function to swap two variables // by references void swapx(int* x, int* y) { int t; t = *x; *x = *y; *y = t; printf("x=%d y=%d\n", *x, *y); } Output: x=20 y=10 a=20 b=10 </pre>
Thus actual values of a and b remain unchanged even after exchanging the values of x and y. Thus actual values of a and b get changed after exchanging values of x and y.
In call by values we cannot alter the values of actual variables through function calls. In call by reference we can alter the values of variables through function calls.
Values of variables are passes by Simple technique. Pointer variables are necessary to define to store the address values of variables.
  • 1 answers

Satwik Dash 6 years, 11 months ago

Practice from previous years sample papers.
  • 1 answers

Aditi Verma 6 years, 11 months ago

No
  • 1 answers

Suresh Krishna 6 years, 11 months ago

8 marks
  • 0 answers
  • 0 answers
  • 1 answers

Suresh Krishna 6 years, 11 months ago

Object Oriented Programming
  • 0 answers
Ups
  • 0 answers
  • 1 answers

Sia ? 3 years, 5 months ago

<th>WORMS</th> <th>TROJAN HORSE</th>
A Worm is a form of malware that replicates itself and can spread to different computers via Network. Trojan Horse is a form of malware that capture some important information about a computer system or a computer network.
The main objective of worms to eat the system resources. The main objective of the trojan horse is to control the activity of the system.
Worms can be detected and removed by the Antivirus and firewall. Trojan horses are detected by the antivirus software.
It doesn’t need a host to replicate from one computer to another. It require host is needed for spreading.
It can give unauthorized access and control of the system to the hackers. It also give unauthorized access and control of the system to the hackers.
It is less harmful as compared. It is more harmful as compared.
Morris Worm, Storm Worm and SQL Slammer are some of the examples of worms. Back orifice, Rootkit and Beast Trojan are some of the common Trojan horses.
Worms are executed via weaknesses in system. Trojan horse executes through a program and interprets as utility software.

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App