write C code to reverse a string such that if i/p is "abc
defg hij klmno pqrs tuv wxyz"
and the o/p should be "cba gfed jih onmlk srqp vut zyxw"
Answers were Sorted based on User's Feedback
Answer / naresh
man()
{
char ch[33];
printf("enter the string");
for(int i=0;i<33;i++)
scanf("%c",&ch[i]);
int k=0;
for(i=0;ch[i]!='/o';i++)
{
if(ch[i]==" ")
{ int n=i;
while(i>=k)
{
printf("%c",ch[i]);
i--;
}
k=n;
}
}
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / bipin chandra sai.s
hay just use concatenation of strings method
{
int temp=int a;
int a=int b;
int b=int temp;
}
| Is This Answer Correct ? | 2 Yes | 6 No |
#include<stdio.h> main() { int a=1; int b=0; b=++a + ++a; printf("%d %d",a,b); }
What is a pointer and how it is initialized?
Difference between data structure and data base.
7 Answers CTS, Value Labs, Zoho,
void main() { int *ptr; ptr = (int *) 0x400 ; printf("ptr=%d",ptr); } output?
Is array name a pointer?
You are given a string which contains some special characters. You also have set of special characters. You are given other string (call it as pattern string). Your job is to write a program to replace each special characters in given string by pattern string. You are not allowed to create new resulting string. You need to allocate some new memory to given existing string but constraint is you can only allocate memory one time. Allocate memory exactly what you need not more not less.
What are the 4 types of programming language?
print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,getchar or putchar
Why void main is used in c?
program to find a smallest number in an array
why programming language C is still used in operating system's kernel??
What is this pointer in c plus plus?