The trouble is you think you have time. Your success depends on how you utilize your time.
Showing posts with label Dry Run Practice. Show all posts
Showing posts with label Dry Run Practice. Show all posts

Dry Run Practice Program # 3

What is the Output of the following program ?

#include<iostream>
using namespace std;
int main ()
{
int a[5]={5,1,15,20,25};
int x,y,z;
x=++a[1];
y=a[1]++;
z=a[x++];
cout<<x<<"  "<<y<<"  "<<z;
return 0;
}

For the Answer Of this Question with Explanation Click Here

Dry Run Practice Program # 2

What are the values assigned to these index (arr[0], arr[1], arr[2], arr[3]) of the following code:

#include<iostream>
using namespace std;
int main()
{
int arr[4];
for(int i=0;i<4;i++)

Dry Run Practice Program 1

What will be the output of the following code:


#include<iostream>
using namespace std;
int main()
{
float arr[]={12.4,2.3,4.5,6.7};
cout<<sizeof(arr)/sizeof(arr[0]);
return 0;
}

For the Solution of this Question with explanation Click Here