hi .. my name is Sunny... i am a beginner in C++ lang... i m trying to write a program to check the probability of tossing a coin 2,3,4 times or n number of times .... now as i said it is tossing of coin .. so there are just 2 possibilities ... either H or T ... i wanna have a sample space set ... for tht i have thought something but i dont know whether it is possible or not ... i wanna know : 1. usually we define array with some size .. eg int a[5] which can store 5 elements ... i wanna know is it possible to declare an array whose size is not fixed .... 2. if i m having 2 arrays of char type ... can i concatinate i th and j th element of these arrays and store the result in 3rd array ... and if yes how .... please if u can tell me the syntax ... 3. like in java we can count the length of the array by using lenght.arrayname ... can we also count the length of array in C++ ... these are some of the basic questions as of now in my mind ... if some one can plzzzz help me out ... Sunny ....
You cannot have arrays but you have pointers for that. You can use the function strcat Nope. You need to know the element length as it cannot be variable in C++