Programmers only

Tony

Veteran Astronaut
C:
int val = 1;
switch (val)
{
   case 1:
      printf ("val=1\n");
   case 2:
      printf ("val=2\n");
}
Easy to find error
whatever the value of val the result is always the same.
 

Tony

Veteran Astronaut
JavaScript allows you to write code using only the web browser's internal compiler. you don't need anything else. this works whatever the operating system used
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
C:
int val = 1;
switch (val)
{
   case 1:
      printf ("val=1\n");
   case 2:
      printf ("val=2\n");
}
Easy to find error
whatever the value of val the result is always the same.
Easy one indeed. I won't spoil the answer though :p
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
Condense o_Oo_Oo_O

Seriously, look at my alert tab:
Screenshot_20200822-125645_Firefox.jpg

Also remember that during a few minutes you can still edit a post. Sometimes you can add something to your post without writing a new one.

C:
int val = 1;
switch (val)
{
   case 1:
      printf ("val=1\n");
   case 2:
      printf ("val=2\n");
}
Easy to find error
whatever the value of val the result is always the same.
Wait, is the output really always the same whatever the value of val? There's a bug when val=1, but I don't think it happens when val=2...
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend

Mars Pathfinder

«★★» CMDR «★★» // PT // FartFinder
Deja Vu
Hot Stuff
Space Glider
Swingin' on a Star
Atlas
Christmas Event Category Winner
1598094806246.png

what the does this first 2 application do??

just ignore the last one if anyone don't know it....