Can someone please convert these into printf statements.I cant get it to work .Thanks

cout<<character[i]<<" "<<int(character[i])<<endl;      


  cout<< numbers[i]<<" "<<char( numbers[i])<<endl;

Assuming character is an array of char and numbers is an array of int:

printf("%c %d\n", character[i], character[i]);
printf("%d %c\n", numbers[i], numbers[i]);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.