Main (Printf ("%d",4%3) Printf ("%d",4%-3) Printf ("%d",-4%3) Printf ("%d",-4%-3) ) A) 1111 B) 11-1-1 C) 1-1-11 D) 1-1-1-1 Q2
Main (Printf ("%d",4%3) Printf ("%d",4%-3) Printf ("%d",-4%3) Printf ("%d",-4%-3) ) A) 1111 B) 11-1-1 C) 1-1-11 D) 1-1-1-1 Q2
Main (Printf ("%d",4%3) Printf ("%d",4%-3) Printf ("%d",-4%3) Printf ("%d",-4%-3) ) A) 1111 B) 11-1-1 C) 1-1-11 D) 1-1-1-1 Q2
main()
printf(“%d”,4%3);
printf(“%d”,4%-3);
printf(“%d”,-4%3);
printf(“%d”,-4%-3);
Q2. Which is the parameter that is added to every non-static member function when it is called?
Q3. main()
printf(“x=%d”,x);
a) 50 b) 0 c) 1 d) Error
Q4.class base
{
public:
int bval;
base(){ bval=0;}
};
int main()
{
base BaseArr[5];
SomeFunc(BaseArr,5);
deri DeriArr[5];
SomeFunc(DeriArr,5);
}
void main ()
{ int i = 0 , a[3] ;
a[i] = i++;
printf (“%d",a[i]) ;
}
void main(){
opOverload a1, a2;
a1= =a2;
}
a) The both are same objects b)The both are different c)Compile Time Error d)RunTime Error
Q9 class some{
public:
~some()
{
cout«"some's destructor"«endl;
}
};
void main()
{
some s;
s.~some();
}
Q10. #include
void main()
{
int cnt = 5, a;
do {
a /= cnt;
} while (cnt --);
Q11#include
main()
{
int k = 5;
printf("%d\n", k);
}
a) 5 b) 6 c) 7 d) 8
Q12 #include
void fn(int);
main()
{
while (val --) fn(val);
printf("%d\n", val);
}
Q15. main()
{
Int x=3,z;
Z=x++ + ++x;
printf(“x=%d z=%d”,x,z);
}
a) 4,10 b)4,8 c)5,7 d)5,8