TCS Company Programming

What should the program below print?
#include
#include
#include
void myfunc(char** param){
++param;
}
int main(){
char* string = (char*)malloc(64);
strcpy(string, "hello_World");
myfunc(&string);
myfunc(&string);
printf("%sn", string);
// ignore memory leak for sake of quiz
return 0;
}
1. hello_World
2. ello_World
3. lo_World
4. llo_World

Read Solution (Total 4)

TCS Other Question

All keywords in C are in
1. Uppercase letters
2. None of these
3. Lowercase letters
4. Camel Case letters
What is the output of this C code?
#include
void main()
{
int k = 5;
int *p = &k;
int **m = &p;
printf("%d%d%dn", k, *p, **p);
}
a) 5 5 5
b) 5 5 junk
c) 5 junk junk
d) Compile time error