#includestdio.hWhat is the output of the above code snippet?int main(){int a;char *x;x = (char *) &a;a = 512;x[0] = 1;x[1] = 2;printf("%d\n",a);return 0;}
How many times will the print statement be executed?
#include iostreamusing namespace std;main(){int i = 0;label:cout"Interviewbit ";i++;if(i 3){goto label;}}
int f(int x, int *py, int **ppz)
{
int y, z;
**ppz += 1;
z = **ppz;
*py += 2;
y = *py;
x += 3;
return x + y + z;
}
void main()
{
int c, *b, **a;
c = 4;
b = &c;
a = &b;
printf("%d ", f(c, b, a));
return 0;
}
#include stdio.h
void solve() {
int a[] = {1, 2, 3, 4, 5};
int sum = 0;
for(int i = 0; i 5; i++) {
if(i % 2 == 0) {
sum += *(a + i);
}
else {
sum -= *(a + i);
}
}
printf("%d", sum);
}
int main() {
solve();
return 0;
}
#include stdio.h
struct employee
{
int id;
char rank[5];
}
void main()
{
struct employee e;
s.no = 30;
printf(howdy);
}
#includestdio.hint main() {char a=3;printf("%d",a1);return 0;}
What will be the output of the following C code?#include stdio.hint main(){signed char chr;chr = 128;printf("%d\n", chr);return 0;}