write function to reverse char array ... without using second
array
Answer Posted / sunitha
/* function to reverse a charactor array */
void rev_array(char str[])
{
char c;
char *p;
p=str;
while(*p)
{
if(*p!='\0')
{
c=p;
}
p++;
}
printf("reverse array is %s\n",c);
}
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What is the -> in c?
What is the use of pointers in C?
What does malloc () calloc () realloc () free () do?
Describe explain how arrays can be passed to a user defined function
i have a written test for microland please give me test pattern
Explain zero based addressing.
When c language was developed?
What is bubble sort technique in c?
How can you tell whether a program was compiled using c versus c++?
What is main () in c language?
if p is a string contained in a string?