I want to print row which I want from 2d array.

Sample code to print k'th row of an array arr with n elements in each row

for(i=0;i<n;i++)
  cout<<arr[k-1][i];

k-1 cuz the first index is 0

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.