int main(void)
{
int n;
char a[100];
cin >> a;
return 0; }
this inputs what the user writes to the array a, but what if i want to input what the user writes into both array a and integer n without forcing the user to write twice, is this possible ?
@koothkeeper: thanks but this inputs the value to two entities of type char*, isn't it possible to input the value in char* variable and int variable ?
@MiiNiPaa: for example a program receiving numbers from user in a while loop to calculate their largest one, at the same time if the user entered the word "end" the program breaks the loop and outputs the largest value, so i need to put what the user writes in both int and array variables