Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
3 answers
106 views

I came across this question when studying logical operators and conditionals in C. #include <stdio.h> int main() { int x = 3; int y = 2; int z = 3; printf("Result #4 = %d\n&...
0 votes
1 answer
105 views

Header file: #include <iostream> #include <string> std::string correctText = "\nCorrect! +"; std::string incorrectText = "False!\n"; std::string answer = "paris&...
-2 votes
2 answers
160 views

#include <unistd.h> void triplet(void); int main(void) { triplet(); } void triplet(void) { char i, j, k; i = '0'; j = '1'; k = '2'; while (i < j) { i + ...
0 votes
2 answers
93 views

I am trying to write a basic C program to display contents of a file on the screen. I am facing a problem with the way if-else seems to work. Here are two codes which I think should work the same, but ...
3 votes
5 answers
513 views

I want to consolidate multiple OR and AND conditions in R. I think x1 == 1 | x1 == 2 can be consolidated as x1 %in% c(1, 2). I'm wondering how x1 == 1 | y1 == 1 and x1 == 1 & y1 == 1 can be ...
0 votes
3 answers
1k views

I recently coded a macro to create multiple "Proc freqs" easily, having to enter simply the variables and the condition "where" (if there is one). It generally works, still I've ...
1 vote
1 answer
213 views

This code below benchmarks the & operation given opposite conditions that benefit or not from lazy evaluation conditions in the vectors. set.seed(1) N <- 1e6 V <- runif(N) v1 <- V > 0....
B.Gao's user avatar
  • 165
1 vote
3 answers
190 views

int a = 0, b= 1, c = 1; if (c-- || ++a && b--) I know that the precedence for && is the highest here. So what happens? Does it start from && and then looks at the expression ...
17 votes
2 answers
4k views

What's the difference between "&&" and "and" in kotlin? in my code, when first condition is false, i've noticed that the condition after "and" is still evaluated ...
0 votes
1 answer
95 views

While the expression is evaluating as expected for 1 && {} giving {} as the answer, however when I flip the operands to make it {} && 1 it gives syntax error. 452:1 Uncaught ...
1 vote
3 answers
122 views

the terminal is showing no output (blank) // if the ages of 3 people are put telling which one is youngest// #include<stdio.h> int main() { int a1,a2,a3; printf("enter the age of ...
2 votes
4 answers
198 views

The following two problems I am having trouble with below are from chapter 5 exercise 3 in "C Programming a Modern Approach" by K.N. King. 1) i = 7; j = 8; k = 9; printf("%d ",(...
-1 votes
2 answers
75 views

I wrote a program that you input your qualities and the program decides that if you are suitable for being astronaut.However, it works when taking the inputs and doesn't continue to the 'if statement' ...
1 vote
1 answer
71 views

I am trying to make a program that detects a user input and prints stuff based on that input. The input needs to have limits set however the if statements I set up are being ignored and I'm not quite ...
-1 votes
2 answers
109 views

So here is the question I am given , I need to tell the output : #include <iostream> using namespace std; int main() { int x = 10; int y = 20; if(x++ > 10 && ++y > 20 ){...

15 30 50 per page
1
2 3 4 5 6

AltStyle によって変換されたページ (->オリジナル) /