TCS Company Programming Program

What is the output of following program?
#include
int main()
{
void *ptr1, *ptr2, x;
int y;
x = 100;
y = 200;

ptr1 = &x;
ptr2 = &y;

printf("%d", *ptr1);
pritnf("%d", *ptr2);

return 0;

}

Read Solution (Total 22)

TCS Other Question

Which of the following is the correct output of the program?
#include
int main()
{
int a[5]={9,10};
printf("%d,%d",a[1],a[2]);
return 0;
}
o/p of the program
#include
int main()
{
enum status { pass, fail, atkt};
enum status stud1, stud2, stud3;
stud1 = pass;
stud2 = atkt;
stud3 = fail;
printf("%d, %d, %dn", stud1, stud2, stud3);
return 0;
}