NVIDIA OA questions
Anonymous User
296

What will be the output of the above C program when compiled on a 64-bit machine?

Question1

#include ‹stdio.h>
#include < stdlib.h›
#define IDK(a) ((char*)(&a+1))-((char )&a)
2
typedef struct XYZ {
char b;
void
a;
} xyz;

int main() {
xyz st;
printf("%d\n", IDK(st));
return 0;
}

Question 2
What is the output of below code

#include <stdio.h›
int main(void)
{
unsigned int a = 10;
int b = -20;
if (a + b > 0) printf ("positive\n");
else printf ("Negative\n");
return 0;
}

Comments (3)