In: Computer Science
c. Windows Linux
Cost | The latest Windows operating system has different versions and wide range of pricing options. | Most Linux distributions are free of cost (at least for private users). |
Licensing model | Proprietary software. | The Linux kernel and most of the distributions are open source and available under a GNU General Public License (GPU). |
User-friendliness | From the outset, Windows was designed to be as simple to use as possible, even for users with no IT knowledge. | While it’s true that Ubuntu in particular is relatively easy for Windows users to grasp, with most of the other Linux distributions, there are significant barriers to entry for newcomers. |
Graphical user interface | Microsoft set standards with its Windows GUI. | Users of Linux distributions have many freedoms in designing the GUI and can even do away with it altogether. |
Support | Windows offers a large range of support services, both within the system and online. There is also comprehensive specialist literature available aimed at users with various levels of knowledge. | Linux support comes from the extensive user community. You can find an answer to almost every problem in the online forums and Wikis. |
Software | Most software released is compatible with Windows. | There are far fewer applications designed specifically for Linux, although some Windows programs can run on Linux. |
Installing programs | Programs are installed by downloading them from websites or from physical storage media. | In Linux, the majority of programs, drivers and packages are supplied via fixed repositories. |
Uninstalling programs | When programs are uninstalled, some components remain on the system. | In Linux, programs are always completely removed. |
Hardware | Windows drivers are available for almost any hardware. | Hardware support is more limited. Some drivers are not available immediately. |
CR 8. Structured exception handling enables you to have complete control over the handling of exceptions, provides support for debuggers, and is usable across all programming languages and machines. Vectored exception handling is an extension to structured exception handling.
#include <string.h>
#include <stdio.h>
#include<windows.h>
void foo (FILE * fileDescr)
{
char c[12];
long lSize;
int mySecretNumber;
fseek (fileDescr , 0 , SEEK_END);
lSize = ftell (fileDescr);
rewind (fileDescr);
fread(c, 1, lSize, fileDescr);
mySecretNumber = atoi(c);
__try
{
mySecretNumber = mySecretNumber / mySecretNumber;
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
printf("In the exception handler");
}
}
int main (int argc, char **argv)
{
FILE * fileDescr = NULL;
if(fileDescr = fopen(argv[1], "r"))
{
foo(fileDescr);
fclose(fileDescr);
}
}
CR 10.
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
clrscr();
int status;
char fname[20];
cout<<"Enter name of file, you want to delete :
";
gets(fname);
status=remove(fname);
if(status==0)
{
cout<<"file
"<<fname<<" deleted successfully..!!\n";
}
else
{
cout<<"Unable to delete file
"<<fname<<"\n";
perror("Error Message ");
}
getch();
}
Hope this helps you. Please give an upvote. Thank you.