main(){

char a[100];

a[0]='a';a[1]]='b';a[2]='c';a[4]='d';

abc(a);

}

abc(char a[]){

a++;

printf("%c",*a);

a++;

printf("%c",*a);

}

Answers were Sorted based on User's Feedback



main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a..

Answer / susie

Explanation:

The base address is modified only in function and as a
result a points to 'b' then after incrementing to 'c' so bc
will be printed.

Is This Answer Correct ?    1 Yes 1 No

main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a..

Answer / romeyo

bc

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

What are the following notations of defining functions known as? i. int abc(int a,float b) { /* some code */ } ii. int abc(a,b) int a; float b; { /* some code*/ }

1 Answers  


main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }

1 Answers  


main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above

4 Answers   Corporate Society, HCL,


why java is platform independent?

13 Answers   Wipro,


main() { clrscr(); } clrscr();

2 Answers  






main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }

2 Answers   Adobe, CSC,


create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

0 Answers   Microsoft,


main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4

2 Answers   HCL,


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

0 Answers   Mbarara University of Science and Technology,


main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }

1 Answers  


Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.

2 Answers  


int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }

3 Answers   Cisco, HCL,


Categories