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
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 |
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"
struct Foo { char *pName; char *pAddress; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); obj->pName = malloc(100); obj->pAddress = malloc(100); strcpy(obj->pName,"Your Name"); strcpy(obj->pAddress, "Your Address"); free(obj); printf("%s", obj->pName); printf("%s", obj->pAddress); } a. Your Name, Your Address b. Your Address, Your Address c. Your Name Your Name d. None of the above
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
plz send me all data structure related programs
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
Program to find the largest sum of contiguous integers in the array. O(n)
main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); } } a. 0, 0 b. 0, 513 c. 512, 0 d. 0, -513
3 Answers HCL, Logical Computers,
C statement to copy a string without using loop and library function..
What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }