A C++ instruction that tells the computer to do something is called a ________.
Which of the following is a Modifying Sequence Operation?
What is the output of the following C program?
What is the range of the floating point numbers?
Which of the following problem causes an exception?
How can the size of a structure be determined?
Which of the following graph traversals closely imitates level order traversal of a binary tree?
What is the purpose of the given C code?
What will be the output of the following C++ code?
#include <iostream.h>
using namespace std;
int main()
{
int c=1;
for(int i=1; i<5; i++)
{
for(int j=1; j<=i; j++)
{
cout<<c;
c++;
}
cout<<endl;
}
return 0;
}
What will be the output of the following code?
#include <bits/stdc++.h>
using namespace std;
void func(int a[], int n, int k)
{
if (k <= n)
{
for (int i = 0; i < k/2; i++)
swap(a[i], a[k-i-1]);
}
}
int main()
{
int a[] = {1, 2, 3, 4, 5};
int n = sizeof(a) / sizeof(int), k = 3;
func(a, n, k);
for (int i = 0; i < n; ++i)
cout << a[i]<<" ";
return 0;
}