Something that I don’t understand happened today when I ran a simple C++ code as is pasted below: #include<bits/stdc++.h> using namespace std; int main() { int a=4,b; b= ++a + ++a; cout<<a<<" "<<b<<endl; //cin>>a; } The above code when executed gives an output 6 12 Whereas… #include<bits/stdc++.h> using namespace std; int main() { int a=4,b; ..
Category : auto-increment
I’m new to Windows batch. I’m trying to read lines from a file input.txt and print run<increment-value> thus for the first line it should print run1 and for the second line run2 and so on. Below is what I tried: set /a c=1 @echo off for /f “tokens=*” %%a in (index.txt) do ( set /a ..
Recent Comments