How many parameters are present in the mismatch function in the non-modifying sequence algorithm?
Which header file should be included to use functions like malloc() and calloc()?
How are members of a union accessed?
What does the acronym 'SBI' stand for?
How can a C function be called in a C++ program?
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
void fun(int x, int y)
{
x = 20;
y = 10;
}
int main()
{
int x = 10;
fun(x, x);
cout << x;
return 0;
}
What is the size of the following union declaration? (Assuming size of double = 8 bytes, size of int = 4 bytes, and size of char = 1 byte)
#include
union uTemp
{
double a;
int b[10];
char c;
}
u;
Which of the following statements is correct regarding constructor definitions in C and C++?
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> v;
for(int i=0;i<5;i++)
v.push_back(i);
auto it=find(v.begin(),v.end(),3);
if(it!=v.end())
cout<<"found";
else
cout<<"not found";
return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int myints[] = {10, 20, 30, 30, 20, 10, 10, 20};
vector<int> v(myints, myints + 8);
sort (v.begin(), v.end());
vector<int> :: iterator low, up;
low = lower_bound (v.begin(), v.end(), 20);
up = upper_bound (v.begin(), v.end(), 20);
cout << (low - v.begin()) << ' ';
cout << (up - v.begin()) << '\n';
return 0;
}