What is the output of the following question?
#include<stdio.h>
int main()
{
char *p;
p = "C Programming";
printf("%c",*&*p);
return 0;
}
1 Crore+ students have signed up on EduRev. Have you? Download the App |
Predict the output of following C++ program
#include<iostream>
using namespace std;
class Test
{
private:
int x;
int y;
public:
Test(int x = 0, int y = 0) { this->x = x; this->y = y; }
static void fun1() { cout << "Inside fun1()"; }
static void fun2() { cout << "Inside fun2()"; this->fun1(); }
};
int main()
{
Test obj;
obj.fun2();
return 0;
}
What is the output of following program?
#include<stdio.h>
int main()
{
int *ptr, a=5;
ptr = &a;
*ptr += 1;
printf("%d, %d", *ptr, a);
return 0;
}
What will be the output of the following program?
#include<stdio.h>
int main()
{
int i = 10;
void *p = &i;
printf("%d\n", (int)*p);
return 0;
}
What is the output of this program?
#include < iostream >
using namespace std;
int main()
{
char arr[20];
int i;
for(i = 0; i < 10; i++)
*(arr + i) = 65 + i;
*(arr + i) = '\0';
cout << arr;
return(0);
}