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 |
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }
Design an implement of the inputs functions for event mode
Is the following code legal? struct a { int x; struct a *b; }
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.
1 Answers Samar State University,
How do you write a program which produces its own source code as its output?
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
How can i find first 5 natural Numbers without using any loop in c language????????
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
main() { char a[4]="HELL"; printf("%s",a); }
How to read a directory in a C program?