Data variables in C Language | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Data variables in C Language

In Language C can I use this int a= 1 || 2|| 3; when I used this compiler show no error.. is this right or wrong??

8th Feb 2018, 9:14 AM
Himanshu
3 ответов
+ 4
yes both are right because OR operations takes one or another value take.
8th Feb 2018, 4:21 PM
VijaySharli
VijaySharli - avatar
+ 2
Basically, double pipe is a boolean operator. For numbers use single |
8th Feb 2018, 12:21 PM
Dead Spez
Dead Spez - avatar
0
no actually it's OR operation
8th Feb 2018, 12:56 PM
Himanshu