write a program to remove duplicate from an ordered char array? in c
Answers were Sorted based on User's Feedback
Answer / shailesh
i m giving simlpe logic here.first sort the characters and
in a array. then check if a[i]==a[i+1],if yes, then move 1
place ahead i the arrray.
| Is This Answer Correct ? | 5 Yes | 8 No |
Answer / avizo
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,sum;
printf("enter the first value a:");
scanf("%d",&a);
printf("enter the second value b:");
scanf("%d",&b);
sum=a+b;
printf("sum=%d",sum);
getch();
}
| Is This Answer Correct ? | 0 Yes | 14 No |
write a program to fined second smallest and largest element in a given series of elements (without sorting)
hOW Can I add character in to pointer array of characters char *a="indian"; ie I want to add google after indian in the char *a
x=2,y=6,z=6 x=y==z; printf(%d",x)
13 Answers Bharat, Cisco, HCL, TCS,
Is double link list a linear data structure? If Yes, Why?If No, Why?
f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
Write a pro-gramme to determine whether the number is even or odd?
what is the use of pointers
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
Find if a number is power of two or not?
What is c method?
Write a program which returns the first non repetitive character in the string?