b) Identify the features of each of these OS platforms that makes it suitable for system
programming.
2. Using the Windows API, Write a C/C++ program to create a file in Windows and write some
text to the file.
Systems programming is the process of writing a software to host or to provide a platform for
other software on a particular system such as phones, computers and embedded systems. In
simple terms any software that make kernel calls can be termed as a system software.
Considering the operating system which is the fundamental software in in both Linux and
Windows.
The kernel
: Both windows and Linux have the core component of the operating system which is
the kernel. However, windows use micro kernel while Linux make use of monolithic kernel.
Hardware and software support
. In terms of software and hardware support, there is a wide
range of software and hardware support for windows due to its large number of users. windows
provide broader driver and hardware support, windows for hardware devices.
Reliability
. The majority of Linux variants are more reliable and can often run for months and
years without needing to be rebooted
// C++ implementation to create a file
#include <bits/stdc++.h>
using namespace std;
// Driver code
int main()
{
// fstream is Stream class to both
// read and write from/to files.
// file is object of fstream class
fstream file;
// opening file "Gfg.txt"
// in out(write) mode
// ios::out Open for output operations.
file.open("Gfg.txt",ios::out);
// If no file is created, then
// show the error message.
if(!file)
{
cout<<"Error in creating file!!!";
return 0;
}
cout<<"File created successfully.";
// closing the file.
// The reason you need to call close()
// at the end of the loop is that trying
// to open a new file without closing the
// first file will fail.
file.close();
return 0;
}
Comments
Leave a comment