Answer to Question #174382 in C++ for Jean Claude

Question #174382

a) Discuss with examples the main difference between system programming and application programming and explain in your own words how each of these can be carried out in the computer system


b) Explain the term structured exception handling (SEH) as used in systems programming and give a practical example of how it can be used to handle errors in a block of code.


c) Write a C/C++ system program to remove an unwanted directory in the Windows file system. Compile and run the program and copy the source code into your answer booklet. 


1
Expert's answer
2021-03-27T21:52:18-0400

A) System programming:

It involves designing and writing computer programs that allow the computer hardware to interface with the programmer and the user, leading to execution of the application software on the computer system. For example- operating system, Firmware, programming tools, compilers, assemblers, I/O routines etc.

Application programming:

It is designed to programmed any specific function, directly for the user level or an application program level.

B) Structured exception handling (SEH):

It is a Microsoft extension, which allows to handle certain exceptional code situations, such as hardware faults. The use of ISO standard c++ exception handling make the code more portable and flexible.

c)

#include<stdio.h>
#include<conio.h>
#include<process.h>
#include<dir.h>

int main()
{
   int cheack;
   char *dirname;

   printf("Enter the directory path which we are going to delte (C:/name):");
   gets(dirname);
   system("dir/p");

   cheack = rmdir(dirname);
   if (!cheack)
      printf("Directory deleted\n");
   else
   {
            printf("Unable to remove directory\n");
            getch();
            exit(1);
   }

return 0;
}




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS