Given a string of 5 names( jonhson, mabel ,anthony, kwame and josef) write the code for the display of :
a) the third element of the array
b) the third element of the second
1
Expert's answer
2011-06-09T07:39:52-0400
#include <iostream.h>
void main() { char names[5][10]={"jonhson", "mabel", "anthony", "kwame", "josef"}; cout<<names[2]<<"\n"; //printing 3-rd element, third element has index 2 cout<<names[1][2]<<"\n"; //printing 3-rd element of the 2-nd int i; cin>>i; //delay }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment