Aira
Can anyone say how will be its output
Talula
Can anyone say how will be its output
It’ll just display numbers in 1 line.
Aira
Ok
Talula
like if you enter 2 3 5 12 it’ll display 23512
Aira
Ok..is there any mistake in written program
Talula
Run it and see…
Aira
But its for written assignment..so thats y i was asking😅
Talula
https://www.onlinegdb.com/online_c_compiler
Aira
Ok thnks alot
Tharanga
👍
Lionel
Need to explicitly mention the size of the array if u are not initializing it. Int a[20] like this
Shubham
Output is 8 but how?
Pavel
Output is 8 but how?
Number literals started with zero counted as numbers with base of 8. Started with 0x - with base of 16. (Not sure how to say it correctly in English) So 010 = 8 021 = 17 0x10 = 16
Shubham
Yes
Are there any other things like this?
Anonymous
Shubham
0b prefix means base 2
Binary? So 0b11 is 3 ?
Anonymous
0b prefix means base 2
But iirc it's since C++11
Shubham
Will hexadecimal work? Also are these only relevant is c/c+ or will they were in JS and Python too?
Shubham
What do you mean?
Will 0b11 work in JavaScript and Python too?
Shubham
I don't know
I tried now and both base 8 and base 2 works in JS but Only Base 2 is working in Python
Shubham
Prefix*
Got it
Daplaze
Administrator - is it ok to put up a job offering in here?
Artöm
Administrator - is it ok to put up a job offering in here?
Wait for @unterumarmung @Neko_cpp @K11M1
klimi
@roxifas wouldn't you guessed it xD
Daplaze
Wait for @unterumarmung @Neko_cpp @K11M1
Ok I will. Thanks for pointing that out!
klimi
Wait please for @roxifas 's reply.
Anonymous
I also want to put a job offering here! I will make c++ program that prints string ! for just 100$
Roxifλsz 🇱🇹
Administrator - is it ok to put up a job offering in here?
At least you asked before posting, so I'll allow it for now (only one message, and make sure it's not a big message)
Anonymous
Seems like you used &a[i] in printf statement. Normally a variable name is given as argument, after the format specifier for that datatype.
Aira
Ok
Anonymous
Also you don't give size of array while declaring it that is you wrote a[], but right way is to specify the size, if in case you want 10 then a[10]. In printf() you should give just a[i] not &a[i], printf() takes variable name along with
Daplaze
We are a group that created a crypto anon coin. We have a working project on an exchange but we need more devs to move forward. The coin is created in c++ and the wallet using QT. If you are interested in hearing more about the possibility please contact me in PM.
Aira
Ok thanks ram
Anonymous
Also you don't give size of array while declaring it that is you wrote a[], but right way is to specify the size, if in case you want 10 then a[10]. In printf() you should give just a[i] not &a[i], printf() takes variable name along with
Format specifier while scanf() need address of the variable to which scanned value to be stored. In your second for loop you written i=0;i<=n,;i++, this loop will give i value starting from 0 to 10 iterating 11 times if n value is 10, but array only contain 10 elements. So if size of array is 10 then loop should go from 0 to 9, since inside array, each variable index start from 0 to array_length-1. Here from a[0] to a[9].
H̲i̲L̲e̲v̲e̲l̲
What's difference between cout and printf()
H̲i̲L̲e̲v̲e̲l̲
And cin and scanf
Anonymous
And usability
H̲i̲L̲e̲v̲e̲l̲
Hmn nice
Aira
Repetitive control structure syntax and example
Aira
I just need simple example..iam bit confused
Aira
K
Anonymous
Learn these, @Aeera113
Anonymous
What's difference between cout and printf()
C printf() and scanf() with format specifier. C++ cin cout with >> getfrom and << putto operator, no need of format specifier. But still some simple methods in c++ for output formating unlike complex syntax in C.
Anonymous
Also printf available at C++. I think it in cstdio header.
Anonymous
What's difference between cout and printf()
printf and scanf are bug prone and not type safe cin/cout are type safe
Ioann_
// just test message
klimi
nohello.com
Dima
Anonymous
// just test message
Yes, we are alive
Harut
Hi everyone. Can you send me link for polymorphism learning ?
Anonymous
can anyone tell what is the time complexity of count() function for set and unordered_set in cpp? Can't find this
klimi
http://www.cplusplus.com/reference/unordered_set/unordered_set/count/
Anonymous
The complexity is constant
Vishnu
iam overloading == operator..it execute correctly but segmentation fault .. how fix this ?? sorry for bad english
Anonymous
Why are you writing return type as str when you're not returning anything?
Forex_guru
Forex_guru
Anyone tell this bug
Anonymous
When we pass a vector<int> made in main to a function fun() like fun(vector<int> f){} Then, Is another vector created on heap and copies the element of the called vector into it?