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
VMariaS [17]
3 years ago
9

Design and implement a program to display each directory entry information (files and directories) of current directory, and wit

h "chdir" call to change (current working directory) to its subdirectory.
Computers and Technology
1 answer:
FromTheMoon [43]3 years ago
3 0

Answer: The code below can display directory as stated in the question

Explanation:

char *

gnu_getcwd ()

{

 size_t size = 100;

 while (1)

   {

     char *buffer = (char *) xmalloc (size);

     if (getcwd (buffer, size) == buffer)

return buffer;

     free (buffer);

     if (errno != ERANGE)

       return 0;

     size *= 2;

   }

}

You might be interested in
How to do this? ICT Excel there's a screenshot attached
gtnhenbr [62]

I cannot see the attachment

8 0
3 years ago
Write a program which asks the user to enter N numbers. The program will print out their average. Try your program with the foll
Likurg_2 [28]

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

int n;

double average,sum=0,x;

cout<<"enter the Value of N:";

// read the value of N

cin>>n;

cout<<"enter "<<n<<" Numbers:";

// read n Numbers

for(int a=0;a<n;a++)

{

   cin>>x;

   // calculate total sum of all numbers

   sum=sum+x;

}

// calculate average

average=sum/n;

// print average

cout<<"average of "<<n<<" Numbers is: "<<average<<endl;

return 0;

}

Explanation:

Read the total number from user i.e "n".Then read "n" numbers from user with for loop and sum them all.Find there average by dividing the sum with n.And print the average.

Output:

enter the Value of N:5

enter 5 Numbers:20.5 19.7 21.3 18.6 22.1

average of 5 Numbers is: 20.44

7 0
3 years ago
A computer's CPU and hard drive are found in the
Galina-37 [17]
A computers CPU and the hard drive are found in the system unit. The correct answer is C. <span />
8 0
3 years ago
Read 2 more answers
Why is there more than one Brainly website?
marta [7]

they are for different countries and languages

8 0
3 years ago
Read 2 more answers
When does if(x!=y) execute?
Dmitriy789 [7]

Answer:

A

Explanation:

4 0
2 years ago
Other questions:
  • Which of the following information is most important to include in a timeline?
    14·1 answer
  • Professional photography is a competitive job field. <br> true <br> false
    12·2 answers
  • Can someone help me with this one
    9·2 answers
  • A(n) ________ CPU has two processing paths, allowing it to process more than one instruction at a time.
    9·2 answers
  • Social media is a type of ___________ ccommunication (type either push or pull for your response).
    8·2 answers
  • Gap junctions and plasmodesmata have what feature in common?
    6·1 answer
  • According the Keown book, which Web-based personal financial planning website is known as "the best free way to manage your mone
    6·1 answer
  • Write a program "addnumbers.c" where it takes as many arguments as the user includes as command line arguments and calculates th
    11·1 answer
  • What is the best stratiget to avoid paying intrest in your credit cared
    13·1 answer
  • Any device that uses light to read and write information.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!