How to resolve the algorithm File size step by step in the Ada programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm File size step by step in the Ada programming language
Table of Contents
Problem Statement
Verify the size of a file called input.txt for a file in the current working directory, and another one in the file system root.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm File size step by step in the Ada programming language
Source code in the ada programming language
with Ada.Directories; use Ada.Directories;
with Ada.Text_IO; use Ada.Text_IO;
procedure Test_File_Size is
begin
Put_Line (File_Size'Image (Size ("input.txt")) & " bytes");
Put_Line (File_Size'Image (Size ("/input.txt")) & " bytes");
end Test_File_Size;
You may also check:How to resolve the algorithm Classes step by step in the Aikido programming language
You may also check:How to resolve the algorithm Sorting algorithms/Comb sort step by step in the C# programming language
You may also check:How to resolve the algorithm Sailors, coconuts and a monkey problem step by step in the Scala programming language
You may also check:How to resolve the algorithm Greedy algorithm for Egyptian fractions step by step in the Factor programming language
You may also check:How to resolve the algorithm Determine if a string is numeric step by step in the jq programming language