TCS Company Programming Program

what will be the o/p of the program
void main()
{
int const * p=5;
printf("%d",++(*p));
}

Read Solution (Total 10)

TCS Other Question

You have Rs.2 with u.You have to play a game in which if u win u will get 1 Re. and if lost you will lose 1 Re.You can lose up to 3 times. But if u get 5 Rs, you are left out of the game. In how many ways is this possible? what will be the o/p of the program
main()
{
char s[ ]="man";
int i;
for(i=0;s[ i ];i++)
printf("n%c%c%c%c",s[i ],*(s+i),*(i+s),i[s]);
}