Message from C, C++ talks

June 2019

— Input

— Try vector it is much easier

— Will check

— Or string class or

or may be try more basic .char array

— 

If i isn't equal to n-1, that condition will evaluate to false which would be the 0th index, so " ", but if i is equal to n-1, then that condition will evaluate to true, which is 1, so it'll access the element at index 1 which is "\n"

— Why it is only valid for last index??

— Because n-1 doesn't change and so the only time that'd be valid is when the loop is on the last iteration

Message permanent page

— What if i want to print a random index char from string other than last index "abcd" c to be printed??

Message permanent page

— What should condition be like?

— So you just want to print a random character from the string?

— Https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution

— Giv simple example

— Hello world

— #ot

— Https://t.me/joinchat/Ci0Cak-BPuxaHdcbjab4QQ