can anyone explain this sequence? "while (v8 = v5, --v5, !!v8)"
can anyone explain this sequence? "while (v8 = v5, --v5, !!v8)"
please pay attention especially to the "!!" double exclamation marks are unfound in C or c++ syntax
See also questions close to this topic
-
about postfix operator and sequence point
void func(int a){ printf("%d",a); } int main(){ int a= 0; printf("%d", a); func(a++); }
This is my code BUT I can't understand why the result is 0 I think the result has to be 1
Because :
The side effect of updating the stored value of the operand shall occur between the previous and the next sequence point.
"a has to be increased before next sequence point"
All side effects of argument expression evaluations are sequenced before the function is entered
"There's sequence point before function is called"
So Isn't the variable a to be increased before func is called?
Can you tell me what am I understanding wrong?
THANK YOU
-
python invalid syntax during the print function
I typed the following code
a = int(input("Please enter the number of tickets:") b = str(input("PVR Cinemas at Inorbit Mall\n Welcomes You\n Please proceed to select a movie from the given options\nEnter the alphabet preceding to your choice\np:The Hangover - 460/-\nq:The Hunger Games - 500/-\nr:Haikyu - 450/-\ns:Harold - 520/-\n") if b == 'p' print("The total amount billed is:",a*460) elif b == 'q' print("The total amount billed is:",a*560) elif b == 'r' print("The total amount billed is:",a*450) elif b == 's' print("The total amount billed is:",a*520)
-
Beginner PowerShell question: how to combine strings that form a command and run the command in the same script?
I've been working in IS for several years as a PC tech. Mostly hardware & OS troubleshooting. I generally only use
PS
/cmd
for basic tasks - lookup serial #, add/default printers,gpupdate
,DISM
/sfc
, etc. I would like to become more familiar withPowerShell
and creating scripts to start automating some tasks.Since it is customary I present to you my very bad and wrong code:
$PCNAME = Read-Host -Prompt "Enter PC Name" Write-Output $PCNAME $CMD = "Enter-PSSession -ComputerName $PCNAME" iex $CMD
Intended purpose:
- Prompt for PC name input
- Add the entered PC name to the
Enter-PSSession
command - Run
PSSession
command
Just to test if it continues after prompt and executes PSSession command. I've tried quite a few variations using snippets of code I found here and there but I am a PS noob and everything so far either fails to run or exits PS after taking the user's input.
If anyone can show me what a functional version of this looks like I would be greatly appreciative. Thanks!