Question

2 When we are implementing the following program, then we press CTRL+C on the keyboard; that will cause: #include <stdio.h>

2 points The following C program will allocate a dynamic memory allocation by using the system call: #include<stdio.h> #inclu

2 points To change the access permissions of the file named share by allowing the owner to read, write, execute), group to

operating system programming
i need ans and explen after 20 min

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here is the solution to above problem . Please give a thumbs up!!!

1) prints caught signal 2 on the terminal is the correct answer

when we press ctrl+c in middle of program it will trigger a signal event with id 2 which will print Caught signal 2 using handle signal function

2) malloc() is correct answer

malloc() enables dynamic memory allocation in C language

3) Chmod share 741 is correct answer

gives the user read,write and execute premissions to a user

Add a comment
Know the answer?
Add Answer to:
operating system programming i need ans and explen after 20 min 2 When we are implementing...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Writing a program in C please help!! My file worked fine before but when I put...

    Writing a program in C please help!! My file worked fine before but when I put the functions in their own files and made a header file the diplayadj() funtion no longer works properly. It will only print the vertices instead of both the vertices and the adjacent like below. example input form commnd line file: A B B C E X C D A C The directed edges in this example are: A can go to both B and...

  • If void * is a pointer to void is a "generic" pointer type, and a void...

    If void * is a pointer to void is a "generic" pointer type, and a void * can be converted to any other pointer type * without an explicit cast, why in the ,myarrcopy function the malloc is created like char and not like void? if we are going to work with different type of arrays? Here is de program: *This is a function that make a copy of any given array. * We then use this function make a...

  • 5. PracticalC Programming a. (4 Points) Why should we use snprintf () instead of sprintf(), strncpy () instead of strc...

    5. PracticalC Programming a. (4 Points) Why should we use snprintf () instead of sprintf(), strncpy () instead of strcpy (), etc.? Seriously, how bad can using sprintf(), strcpy ), etc. be? b. (4 Points) What does extern mean? What does it tell the compiler to do? c. (8 Points) The program below will compile well but run poorly. Please make it do error checking and fix it to make it proper: #include #include <stdlib.h> <stdio.h> <sys/types.h> <sys/stat.h> #include #include...

  • ****Using C and only C**** I have some C code that has the function addRecord, to...

    ****Using C and only C**** I have some C code that has the function addRecord, to add a record to a linked list of records. However, when I run it, the program exits after asking the user to input the address. See picture below: Here is my code: #include<stdio.h> #include<stdlib.h> struct record { int accountno; char name[25]; char address[80]; struct record* next; }; void addRecord(struct record* newRecord) //Function For Adding Record at last in a SinglyLinkedList { struct record *current,*start,*temp;...

  • //In this assignment, we use multiple threads to calculate the sum // 1*1 + 2*2 +...

    //In this assignment, we use multiple threads to calculate the sum // 1*1 + 2*2 + 3*3 + 4*4 + ... + n*n // Note we should know from CSE2500 that this sum is // n*(n+1)*(2*n+1)/6 // We a n value, we will create 2*n threads to do the calculation so that // we can have a race condition. // Before you change the code, read the code and run the code and see what // happens. Do we already...

  • There are a number of changes that we need to make: 1) We need to take...

    There are a number of changes that we need to make: 1) We need to take the board size (width and height) as command line parameters. If these are not specified, we should print out a message informing the user how to call the program. 2) We need to initialize a game board. Allocate memory, decide if each square has bombs, and count the squares surrounding that have bombs. 3) We need to free the game board. Because we need...

  • I have the following code....from the previous lab....the above needs to be added to what is...

    I have the following code....from the previous lab....the above needs to be added to what is already existing. ALSO MODIFY SEMAPHORES TO USE pthreads instead of the pipe constructs P() & V() #include <stdio.h> #include <string.h> #include <sys/types.h> #include <unistd.h> #include <sys/wait.h> #include <stdlib.h> #include <sys/stat.h> void printStat(char *filename); //Main int main(int argc, char *argv[]) { //Process Id (storing)    pid_t pid;    int j;    //printf("Welcome to Project Three\nā€);    // For loop*/    for (j = 1; j...

  • For Unix in a C/C++ environment echoServer and echoClient are provided below In this lab, we will...

    For Unix in a C/C++ environment echoServer and echoClient are provided below In this lab, we will modifiy echoServer.c and echoClient.c programs (for the server's port# not fixed). (1) Modify echoServer.c program to take one argument (a port number) to be used for its listening port when it starts. (2) Modify echoClient.c program to take two arguments (server's IP address and Port number) to be used for its connection. (3) Find a port free for the server using netstat (see...

  • program in C - Starter code below //In this assignment, we practice call by reference. //Below...

    program in C - Starter code below //In this assignment, we practice call by reference. //Below description of call by reference is from the following link //https://www.tutorialspoint.com/cprogramming/c_function_call_by_reference.htm //The call by reference method of passing arguments to a function copies //the address of an argument into the formal parameter. Inside the function, //the address is used to access the actual argument used in the call. //It means the changes made to the parameter affect the passed argument. //We use an example...

  • I need help implementing the following code without using filehandling and only getchar(); this is the...

    I need help implementing the following code without using filehandling and only getchar(); this is the prompt "The input for your program will be a text file containing a large amount of English. Typically, an English sentence ends with a period (aka, dot). Many years ago, when people used mechanical typewriters, the proper form was to place one space between words in a sentence, but two spaces after the period at the end of the sentence. This rule is no...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT