Skip to main content

C Programming - file manipulation

Access Modes
 “r” File is opened for reading only, does not create a file.
“w” File is opened for writing only (start from the beginning of the file, wipes any stored data)
 “a” File is opened for appending only (start from the end of the file without deleting anything)
“r+” File is opened for reading plus (read and insert (overwrite) starting from the beginning of the file, can not create a new file)
“w+” File is opened for writing (create, read and write, wipes any stored data)
 “a+” File is opened for appending (read the whole file or writing at the end

Comments

Popular posts from this blog

How Econet helped shape my career

I can code in several languages though I specialize in full stack web development thanks to Econet Zimbabwe.

During the  days when I started writing code in early 2014 I visited the Econet Zimbabwe website and found that they had some zero rated websites. This meant that, as an econet subscriber, I could access some sites for free without the need to buy any internet bundles.



The zero rated content was arranged into different categories and I headed to the education section where I started reading articles on coding. I enjoyed the tutorials titled "Learn Python The Hard Way". I followed most if not all the instructions on a PC I had assembled by myself. I became proficient in coding in Python.

My relationship with econet did not end in learning to code from zero rated content. In 2016 while attending a course in photojournalism I met a guy who was interested with my achievements in coding, by then I had already become a Google developer and I had published an app in the Play…

Google Drive Direct Link Generator

Google Drive Direct Link Generator


GENERATE LINK

Do you have any files on Google Drive that you would like to share with others so that they can easily download them? We all know that if you share a file from Google Drive the person you send the link to can not directly download the file. The file first opens in Google Drive before and then one has to click on the option to download. Follow the instructions below on how to make any file saved on Google Drive downloadable by just clicking on a link.

Instructions

Step 1 You must have a file saved on Google Drive. If you do not have it yet then upload a file to Google Drive.



Step 2 Click on the file you have uploaded on Google drive and turn on link sharing.




Step 3 Now edit permissions on the link sharing so anyone with the link can view.



Step 4 Now go on to the file and click. An option to copy the file's link will appear. Copy the link.




Step 5 Now go and paste the link into the above link generator and click the generate button.

A new l…

How To Upload Files To A Text Area In MyVista

*updated To use embedded files in a text area follow these steps:

 Go to the text area by clicking an assignment submission link.

Click the file icon and upload a file.





To use the file you need to get its URL or link then paste the link in the text area. Many people fail to do this due to the link buttons being grayed out. There are two methods to overcome this problem. The new updated and simple method is to highlight any text in the text area and voila! The link will be now available. 


 The other but difficult method by embedding the file using HTML as shown below.

Before  you can use the above HTML editor ,as in the previous method, first go to the file you uploaded and right click your mouse or long click on the file to copy its link.

Return  to the HTML editor and put an anchor tag which is an HTML expression which embeds a link to an online resource (like your file), as shown below. Simply copy the expression but replace (copied_link) with the actual link you copied and Name …

Information Technology Basics

What is Information Technology?
It is the use or study of all the technology involved in collecting, storing , sharing and retrieval of data or information. It has three main components which are the computer, computer network and know-how. I shall first look at computers in detail.Computers are composed of hardware and software. There are five categories of computers but they generally have the same features. The classifications of computers are, Mainframe, Supercomputer, workstation, minicomputer and microcomputer.Hardware
The physical components of the computer. There is basically the system unit and peripheral components which are devices connected to the system unit. The peripheral devices are classified as either output or in put devices, though some can be both like a hard drive, a monitor with a touch screen or a printer with a scanner. Output devices
The most common output devices are  monitor, speakers and printer and hard drive.Input devices
The commonly used input devices …

Email Signature Generator

Email Signature Generator

FIRST NAME

LAST NAME

MOBILE NUMBER

EMAIL

JOB TITLE

DEPARTMENT

COMPANY

WEBSITE

OFFICE FAX

ADDRESS LINE 1

ADDRESS LINE 2

LOGO/AVATAR (you can upload image to Google Drive and create link )

Apply Signature
Your email signature will appear here. Copy and paste it in the Gmail app.
StewartMukonziFreelance Digital MarketerMarketingTimid CoderP: +263999210M: +263F:  +263999210A: ZRP Borrowdale Camp199 HebronW: http://www.stewartmukonzi.blogspot.comE: 

How Important is Yandex to A Digital Marketer?

I have come up with an argument and I would like the reader to consider whether it is valid or not.  Here is the argument: If it is a a major search engine then I should submit a site map using the search engine's webmaster tools.  Yandex is a major search engine. Therefore I submitted a site map. Is the argument valid?

If you are a digital marketer I would like to hear your answer. The above argument can be validated using mathematical predicate logic and truth tables. However not all digital marketers are mathematicians therefore I have come up with reasons why Yandex is worth considering in an SEO strategy. Let me first define what a search engine is so as to rope in digital marketing newbies in the conversation.

Search engines are web application which use software programs called crawlers or bots search the internet and gather information. The information which the crawlers collect is then stored in a database base which is referred to as and Index. If a page is indexed it …

Egyptian Binary

The Egyptian Binary is a method to calculate the product of two numbers by mainly using addition.
The following is the algorithm

1.0  Start
2.0  Get a,b and sum
    sum=0;
3.0  While a>=1

        3.1.0  If a%2>0

                 3.1.1 Start_If
                 3.1.2 sum=sum+b;
                 3.1.3 End_If

        3.2  a /=2;
             b +=b;

4.0 Display sum
5.0 End

The following is the source code for the C Program.

A Comparison between a German Shepherd and a Belgian Shepherd

While I was working as a police officer I had an opportunity to train and work with an Alsatian or German Shepherd Dog (GSD). They look vicious because of their pixie ears. They are good for use as drug dogs or patrol dogs. They can weigh above 30kg and can be quite huge in comparison to most dog breeds. I remember seeing a Malinois or Belgian Shepherd Dog (BSD) on a TV show and I wished I could one day own that kind of dog. I eventually had an opportunity to train as well as handle a BSD and now I am ready to give a comparison between the two. Food Rations
GSDs require slightly more rations than BSDs to keep nourished. Malinois can destroy empty food bowels so ensure you remove them soon after they finish eating.Sniffing
They are at par, however BSDs move with great speed and are a marvel to watch when they are working.Agility
Alsatians are outdone by BSDs in this category. GSDs also usually suffer from hip dysplasia and so you have to be careful when doing agility exercises.Agressio…

Free web hosting for all types of users.

Hostinger offers Free web hosting which supports back end integration. It is better than blogger and WordPress when it comes to web development. Ideal for developers to horn their skills.
Great for hosting a project for inclusion in a portfolio. They have two solutions. First one is 000webhost. You can check out my sample site. Shona Dictionary/ The other one is paid-hosting. I found it cheap although the control panel was not user-friendly. Maybe it was because i am accustomed to using Dreamhost.