1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
natka813 [3]
3 years ago
6

What are the disadvantages of using pointers?

Computers and Technology
1 answer:
garik1379 [7]3 years ago
5 0

Explanation:

The pointer is the variable that will store the address of the other variable of the same datatype.

Following are the disadvantages of using a pointer.

1. Pointer sometimes causes a segmentation fault in the program.

2. Sometimes pointer leads to a memory leak.

3. A pointer variable is slower than normal variable.

4. Sometimes the program is crash if we using pointer because sufficient memory is not allocated during runtime.

5. If we using pointer it is difficult to find the error in the program.

You might be interested in
The amount of interest you will earn in one year from a savings account is the _____. A) APY B) return C) IDA D) CD
pav-90 [236]
B) return,<span>D) CD  i now is the </span>
7 0
3 years ago
Read 2 more answers
Write a method swaparrayends() that swaps the first and last elements of its array parameter. ex: sortarray = {10, 20, 30, 40} b
Alexus [3.1K]
In the C programming language, you can't determine the array size from the parameter, so you have to pass it in as an extra parameter. The solution could be:

#include <stdio.h>

void swaparrayends(int arr[], int nrElements)
{
int temp = arr[0];
arr[0] = arr[nrElements - 1];
arr[nrElements - 1] = temp;
}


void main()
{
int i;
int myArray[] = { 1,2,3,4,5 };
int nrElements = sizeof(myArray) / sizeof(myArray[0]);
swaparrayends(myArray, nrElements);

for (i = 0; i < nrElements; i++)
{
printf("%d ", myArray[i]);
}

getchar();
}

In higher languages like C# it becomes much simpler:

        static void Main(string[] args)
        {
            int[] myArray = {1, 2, 3, 4, 5};
            swaparrayends(myArray);
            foreach (var el in myArray)
            {
                Console.Write(el + " ");
            }

            Console.ReadLine();
        }

        static void swaparrayends(int[] arr)
        {
            int temp = arr[0];
            arr[0] = arr.Last();
            arr[arr.Length - 1] = temp;
        }

3 0
3 years ago
A weak fuel to air mixture along with normal airflow through a turbine engine may result in?
Sladkaya [172]

Answer:

A weak fuel to air mixture along with normal airflow through a turbine engine may result in <u>a lean die out</u>.

Explanation:

Lean die out is a type of problem that may occur in the turbine. This may result in the weak fuel to air mixture. In case if the mixture of fuel and air is getting low due to some reasons like leakage of gas or low speed of engine may result in dangerous conditions such as fire or blast in the turbine. This is called lean die out. In the result of this problem, the turbine can be burn with the blast and may leads to causalities.

5 0
3 years ago
Help I need the code for In and out Milky Way in CoderZ
inn [45]

Answer:

it is code A o

Explanation:

4 0
2 years ago
Give 15 examples of copyright and trademarks that we come in contact with everyday. (Doesn't hve to be 15 could be 3 or 5) PLEAS
oksano4ka [1.4K]
Roads, trading, Government, water systems,
6 0
3 years ago
Other questions:
  • Which piece of personal information do websites often require users to enter?
    6·2 answers
  • convert the following c code to mips. assume the address of base array is associated with $s0, n is associated with $s1, positio
    14·1 answer
  • Write a MARIE program to allow the user to input 8 integers (positive, negative, or zero) and then find the smallest and the lar
    15·1 answer
  • What can search the Internet and select elements based on important words?
    6·2 answers
  • Select the best word or phrase to complete each sentence Jobs that require you to use your v are typically rewarding Individuals
    12·1 answer
  • What is the definition of software? Group of answer choices an instruction that causes a single specific action to be performed
    11·1 answer
  • a pair of shoes is on sale for 15% off with this discount customers will pay $9 if they buy the shoes ​
    14·1 answer
  • Learning Task 3: Write the safety requirement indicated in each number on a
    15·1 answer
  • The field names in a database are also known as__?
    12·2 answers
  • 48
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!