Declaring a pointer more than once can cause:
#include <bits/stdc++.h>
using namespace std;
int main() {
int a=4;
cout<<(++a)*2 +(a++)*a;
return 0;
}
Which of the following is not possible in C?
Which of the following is not done by function pointer?
When a programming language has the capability to produce new data types, it can be called as
What is a string object in C++?
Which component of a programming language implicitly creates a default constructor when the programmer does not explicitly define at least one constructor for a class?
What are functors in C++?
#include<stdio.h>
struct student
{
int roll;
int cgpa;
int sgpa[8];
};
void main()
{
struct student s={12,8,7,2,5,9};
int *ptr;
ptr=(int *)&s;
clrscr();
printf("%d",*(ptr+3));
getch();
}
What will output when you compile and run the above code?
#include <iostream>
#include <algorithm>
using namespace std;
bool myfn(int i, int j)
{
return i < j;
}
int main ()
{
int myints[ ] = {3, 7, 2, 5, 6, 4, 9};
cout << *min_element(myints, myints + 7, myfn) << '\n';
cout << *max_element(myints, myints + 7, myfn) << '\n';
return 0;
}