Which of the following is the correct operator to compare two variables?
Which function is used to check whether a character is a number?
#include<stdio.h>
#def val 32
int main()
{
char s[]="abekus";
*(s+0) &= ~val;
*(s+4) &= ~val;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
char *ptr ;
ptr = "hello";
cout<<*ptr;
return 0;
}
The main purpose of a garbage collector is to free the programmer from worrying about _____.
#include<stdio.h>
int main()
{
static int num = 5;
printf("%d ", num--);
if(num)
main();
return 0;
}
How many times is 'abc' printed in the following code?
int main()
{
int a = 0;
while(a++)
printf("abc");
return 0;
}
What is the output of the following code?
#include<iostream.h>
void Execute(int &x, int y = 200)
{
int TEMP = x + y;
x+= TEMP;
if(y!=200)
cout<<TEMP<<x<<y"--";
}
int main()
{
int A=50, B=20;
cout<<A<<B<<"--";
Execute(A,B);
cout<<A<<B<<"--";
return 0;
}
Which of the following is correct about this pointer in C++?
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
char first, second;
cout << "Enter a word: ";
first = cin.get();
cin.ignore(); // Clear the input buffer
second = cin.get();
cout << first << endl;
cout << second << endl;
return 0;
}