Shouthiri, P. and Thushika, N. (2019) A Comparative Analysis of Looping Structures: Comparison of ‘While’ Loop and ‘Do-While’ Loop in the C++ Language. Asian Journal of Research in Computer Science, 2 (3). pp. 1-5. ISSN 2581-8260
Shouthiri232018AJRCOS46136.pdf - Published Version
Download (212kB)
Abstract
Looping is one of the fundamental logical instructions used for repeating a block of statements. All programming languages are used looping structures to simplify the programs. Loops are supported by all modern programming languages, though their implementations and syntax may differ. This paper compares the two types of looping structures while and do-while using the compile time and runtime of the given programs to improve the efficiency of the programs. It is found that for small number of iterations while is efficient in runtime and do-while is efficient in compile time, the difference in total execution time may not be considerable. But given any large number of iterations, the difference is noticeable.
Item Type: | Article |
---|---|
Subjects: | Open Archive Press > Computer Science |
Depositing User: | Unnamed user with email support@openarchivepress.com |
Date Deposited: | 09 May 2023 05:37 |
Last Modified: | 06 Jul 2024 06:48 |
URI: | http://library.2pressrelease.co.in/id/eprint/1070 |