ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Examples of while loops || Lesson 38.4 || C Programming || Learning Monkey ||

Examples of while loops

while loops in c

loops examples

loops in c

loops examples for placements

while loop

c programming

c programming for beginners

c programming full course

c programming tutorial

c programming for placements

how to prepare c programming for placement

learn c programming for placement

learning monkey

learning monkey c programming

gate cse

gate cse c programming

gate cse c programming questions

gate cse preparation

gate cse syllabus

Автор: Wisdomers - Computer Science and Engineering

Загружено: 2021-09-21

Просмотров: 322

Описание: Examples of while loops

In this class, we will understand Examples of while loops.

We have already discussed the concept of a while loop.

The examples we cover are straightforward but tricky while attempting them in competitive exams or placements exams.


Examples of while loops
Example 1


In the above example, the value of i is -1.

The “i++” in the while loop will confuse us in the exam and make us feel the value of ‘i’ 0.

So we think that 0==0, and we will enter the while loop and print the statement.

But the i++ is post-increment, the value of ‘i’ is -1 and used -1 in the expression, and later the incrementation is done.

We should be cautious while answering such questions.
Example 2


In the while loop, i = 2 is there, which is an assignment operator.

Generally, we think that assignment operators are not allowed in the loops.

But the assignments are allowed.

The output of the assignment expression is the value that is assigned.

In the above case, the output is 2.

Any number other than 0 is “true,” so we will enter into the loop’s body.

If we assign i =0, it will be false, and we don’t enter the loop’s body.


#learningmonkey #cprogrammingforbeginners #placements #gatecse #cprogramming #cprogramminglanguage


Link for playlists:
   / @wisdomerscse  


Link for our website: https://learningmonkey.in

Follow us on Facebook @   / learningmonkey  

Follow us on Instagram @   / learningmonkey1  

Follow us on Twitter @   / _learningmonkey  

Mail us @ [email protected]

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Examples of while loops || Lesson 38.4 || C Programming || Learning Monkey ||

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]