How many constructors can a class have?
Which of the following operator is used with this pointer to access members of a class?
Which of the following options is an exception to being a part of composite data types?
int main()
{
int i;
int arr[5] = {1};
for (i = 0; i < 5; i++)
printf("%d ", arr[i]);
return 0;
}
For the following variable declaration and initialization, What numerical value does the variable c have? (Give your answer as a decimal integer.)
char c = 'E';
What is static memory allocation?
Find the error in the following syntax for conditional compilation:
#ifdef macro_name
statement1;
statement2;
statement3;
.
.
.
statementN;
#endif
Which of the following feature of OOPs is not used in the following C++ code?
class A
{
int i;
public:
void print(){cout<<"hello"<<i;}
}
class B: public A
{
int j;
public:
void assign(int a){j = a;}
}
What happens if the following program is executed in C and C++?
#include <stdio.h>
void func(void)
{
printf("Hello");
}
void main()
{
func();
func(2);
}
In the given C snippet, find the statement number that has error.
1. void push( struct stack *s, int x)
2. {
3. if(s->top==MAX-1)
4. {
5. printf(“stack overflow”);
6. }
7. else
8. {
9. s->items[++s->top]=x;
10. s++;
11. }
12.}
OnSite
1 Openings
FullTime
Posted 17 days ago