How many times will this loop execute?
How many times will this loop execute? Explain your answer. unsigned char half_limit = 150; for (unsigned char i = 0; i < 2 * half_limit; ++i) { // do something; }
- 8944 दृश्य
- 1 उत्तर
1 उत्तर
-
-
- 22 जुलाई
- 0 टिप्पणी
-
- Where to find internship for C plus plus ?
- What is C++? How one can go for C++ in engineering?
- What is C++ programming language used for?
- What is difference between C and C++ ?
- What are tips for someone whose learning C++?
- Early bindingand Late binding in C++
- Accessing private and protected members
- Online test for C plus plus language
- Reallocation of pointers in C++
- Which software is used for C and C++?
मॉक परीक्षण अभ्यास के लिए
c plus plus programming
this code will result in an infinite loop. However since i is an unsigned char, it is represented by an 8-bit value which, after reaching 255, will overflow (so it will go back to 0) and the loop will, therefore, go on forever.