Open Access   Article Go Back

A Comparison of while, do-while and for loop in C programming language based on Assembly Code Generation

J. Makhijani1 , M. Niranjan2 , Y. Sharma3

Section:Research Paper, Product Type: Journal Paper
Volume-7 , Issue-6 , Page no. 1204-1211, Jun-2019

CrossRef-DOI:   https://doi.org/10.26438/ijcse/v7i6.12041211

Online published on Jun 30, 2019

Copyright © J. Makhijani, M. Niranjan, Y. Sharma . This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

View this paper at   Google Scholar | DPI Digital Library

How to Cite this Paper

  • IEEE Citation
  • MLA Citation
  • APA Citation
  • BibTex Citation
  • RIS Citation

IEEE Style Citation: J. Makhijani, M. Niranjan, Y. Sharma, “A Comparison of while, do-while and for loop in C programming language based on Assembly Code Generation,” International Journal of Computer Sciences and Engineering, Vol.7, Issue.6, pp.1204-1211, 2019.

MLA Style Citation: J. Makhijani, M. Niranjan, Y. Sharma "A Comparison of while, do-while and for loop in C programming language based on Assembly Code Generation." International Journal of Computer Sciences and Engineering 7.6 (2019): 1204-1211.

APA Style Citation: J. Makhijani, M. Niranjan, Y. Sharma, (2019). A Comparison of while, do-while and for loop in C programming language based on Assembly Code Generation. International Journal of Computer Sciences and Engineering, 7(6), 1204-1211.

BibTex Style Citation:
@article{Makhijani_2019,
author = {J. Makhijani, M. Niranjan, Y. Sharma},
title = {A Comparison of while, do-while and for loop in C programming language based on Assembly Code Generation},
journal = {International Journal of Computer Sciences and Engineering},
issue_date = {6 2019},
volume = {7},
Issue = {6},
month = {6},
year = {2019},
issn = {2347-2693},
pages = {1204-1211},
url = {https://www.ijcseonline.org/full_paper_view.php?paper_id=4709},
doi = {https://doi.org/10.26438/ijcse/v7i6.12041211}
publisher = {IJCSE, Indore, INDIA},
}

RIS Style Citation:
TY - JOUR
DO = {https://doi.org/10.26438/ijcse/v7i6.12041211}
UR - https://www.ijcseonline.org/full_paper_view.php?paper_id=4709
TI - A Comparison of while, do-while and for loop in C programming language based on Assembly Code Generation
T2 - International Journal of Computer Sciences and Engineering
AU - J. Makhijani, M. Niranjan, Y. Sharma
PY - 2019
DA - 2019/06/30
PB - IJCSE, Indore, INDIA
SP - 1204-1211
IS - 6
VL - 7
SN - 2347-2693
ER -

VIEWS PDF XML
319 265 downloads 152 downloads
  
  
           

Abstract

C is a programming language which is the most powerful and useful language ever for the programmers and developers. Like all the modern programming languages, the C language also has many control statements out of which five are iterative statements, i.e., while, do-while and for. These three statements are meant for use in same conditions, but which one is better. The performance of these three statement does not compared by the novice programmers. So, a basic knowledge of performance of these loops should be there. This comparison will guide novice programmers to use these loops efficiently. The comparison can be done by counting the execution time but that can depend on other factors also like CPU usage by other programs or services etc. But a very efficient way to compare is the comparison of Assembly Instruction generated by a program, so here we are presenting a comparison based on the assembly code generation by each loop which can be seen by the object file created just after the compilation.

Key-Words / Index Term

while, do-while, for, assembly code

References

[1]. Mark Burgess, “The GNU C Programming Tutorial”, Ron Hale-Evans, Norway, pp. 61-68, 2002
[2]. E Balagurusamy, “Programming in ANSI C”, Tata McGraw-Hill, India, pp 154-159, 2007
[3]. Joseph Cavanagh, “X86 Assembly Language and C Fundamentals”, CRC Press Taylor & Francis Group, New York, pp 251-266, 2013