How to convert Sudo Code to C language ?
CRT display(){
//wait for signal to come from iprocess
//check shared memory;
If(shared memory full){
//take items from shared memory
//printf(“the string”);
}
Here the question is not clear how take items from shared memory. Please be more specific. Program: #include <stdio.h> int crt_display(int user_siganl) { int shared_memory = user_signal; shared_memory = shared_memory + user_signal; if (shared_memory = full) { return(user_signal); } else { return ; } }
int main() { int user_signal; printf("Enter signal value: "); scanf("%d",&user_signal); int data = crt_display(int user_siganl); while(data != null) { printf ("The shared memory is full with %d",data); } return 0; }
Get Answers For Free
Most questions answered within 1 hours.