code for reverse alternate words from astring
Answer / rohit
#include<stdio.h>
#include<conio.h>
int main()
{
char string[30]="hoow are you?";
static char stoken[15][10];
int i,j,k;
j=0;k=0;
for(i=0;string[i]!='\0';i++,k++)
{
if(string[i]==' ')
{
j++;
k=0;
}
else
{
stoken[j][k]=string[i];
}
}
for(i=j;i>=0;i--)
printf("%s\n",stoken[i]);
getch();
return 1;
}
Is This Answer Correct ? | 6 Yes | 23 No |
write a program to check whether a number is Peterson or not.
difference between spiral and waterfall model
why program counter is 16 bit?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
How can this be legal c?
Write a program in C to print the alphabets in order as on a mobile phone.i.e:When 2 is pressed once 'a' prints and if it is pressed two times 'b' prints and so on.we have to print all the alphabets as on mobile phone like this.
Write the following function in C. stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return - 1. The function should not make use of any C library function calls.
3 Answers Google, Infosys, JTL, OpenFeel,
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
What is Bitwise Operator and how it works?
Is c pass by value or reference?
write a program fibonacci series and palindrome program in c
0 Answers Aditi Placement Service,
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }