In this example we will show how to get the time when a file was created, last accessed and last written to in C# Example We get the date and …
-
-
In this example we show how to create a new directory in C# Example The new Directory is created on the J drive directory using the CreateDirectory() function. You may …
-
In this example we list all of the files in a directory in C# Example You need to change the directory – J:\csharp\basics The files in the directory are printed …
-
In this example we will show you how to check for the existence of a file in C# Example The existence of the file is checked using the File.Exist function …
-
In this example we show you how to create a new file in C# Example We use the Create() function the file is created and the content is written to …
-
In this example we will list all disk drives in C# Example We use the DriveInfo.GetDrives function to list all the drives and then we loop through them all to …
-
In this code example we will show how to get the length of a string in C++ There are 2 ways to do this in this code example You can …
-
In this example we will print a multiplication table in C using a number that a user inputs on the command line Example #include<stdio.h> int main() { int number,count; printf(“Enter …
-
In this example we will check if a number is odd or even Example We take a number from a user and store it in a variable called number #include<stdio.h> …
-
In this example we show you how to display the current date and time in C We will include the time library and then use the function char *ctime(const time_t …
-
In this example we show you how to check if a year is a leap year in C To determine whether a year is a leap year, follow these steps: …
-
In this example we will look at how to check if a year is a leap year or not if a year is not divisible by 4 then it is not a …