in structures can we swap two structure variables as such?like for example:
say i create a structure called book and i want to arrange the books in ascending order depending on the book...
Type: Posts; User: baffleddreams
in structures can we swap two structure variables as such?like for example:
say i create a structure called book and i want to arrange the books in ascending order depending on the book...
this is simlper and easy...
insert
#include<stdio.h>
#include<conio.h>
int main()
{
int n,s=-1,pwr=1,dr=1;
float nr,x,sum,i,x1;
i think fgets()
is used to get a file....also a string....try only with gets ....cos fgets() has a lot of code writtern behind it(same is the case with scanf() )
how do i use a loop construct?and what is a loop construct?
u can use the strcmp() function ...
char s[n][20];//where n is d no of strings
insert
for(i=0;1<n;i++)
{
for(j=i+1;j<n;j++)
{
...
I am new 2 programming .....i have a problem with partitioning an array using quick sort methord.....i am not supposed 2 use recursion ....instead i've used the goto statement....can any one pls...
in this above program ive just done partitioning....now how do i find the kth largest and the kth smallest element?
i have used the quick sort methord........ im not supposed to use recursion
insert
#include<stdio.h>
#include<conio.h>
int main()
{
int x[20],n,i,k;
printf("\nEnter size...
this is what i have done till now.....i am not supposed to use "recursion"
insert
#include<stdio.h>
#include<conio.h>
int main()
{
int x[20],n,i,k;
printf("\nEnter size...
is is that v first sort it in ascending or descending order and the find the kth largest or smallest ?
Can anyone help me 2 find d kth largest &kth smallest element in an array?
how 2 remove duplicates in an ordered array?please give me a solution
do u noe how 2 avoid duplicates in an array while taking inputs
please help me....im new 2 prog.....i wanna noe what partitioning array is,,,
i want to swap two numbers without using a third variable && an arithmetic operator