# Search:

Type: Posts; User: ramayana

1. ## Thread: Quick Sort

by ramayana
Replies
9
Views
1,266

### temp=pivot; pivot=a[j]; a[j]=temp;...

temp=pivot;
pivot=a[j];
a[j]=temp;

if changed to

temp=a[low];
a[low]=a[j];
2. ## Thread: Quick Sort

by ramayana
Replies
9
Views
1,266

### Sorry for the indentation this is the best I...

Sorry for the indentation this is the best I could manage , about the main() this is the way I do and I don't think it comes in the way of the program . I have tried tracing the program but the...
3. ## Thread: Quick Sort

by ramayana
Replies
9
Views
1,266

### Quick Sort

This program is supposed to impelement quicksort but it is not working

include<stdio.h>
#include<conio.h>
#include<process.h>
void quicksort(int a[] ,int low,int high);
int partition(int...
4. ## Thread: Recursion problem

by ramayana
Replies
3
Views
874

### ok , if that happens "c" and "d" won't be...

ok , if that happens "c" and "d" won't be executed as the block following if will be skipped.
5. ## Thread: Recursion problem

by ramayana
Replies
3
Views
874

### Recursion problem

Given below is a function which is part of a bigger program implementing Merge Sort http://linux.wku.edu/~lamonml/algor/sort/merge.html

void merge_sort(int a[], int low , int high) //a
{
...
6. ## Thread: Problem woth CLK_TCK

by ramayana
Replies
5
Views
2,345

### Can it be because I'm using float and not double ...

Can it be because I'm using float and not double and beacuse the time elapsed is small enough that it doesnt fit onto the float format?
7. ## Thread: Problem woth CLK_TCK

by ramayana
Replies
5
Views
2,345

### Problem woth CLK_TCK

I'm supposed to do a sequential earch on integers and also retun the time elapsed on doing such a search . Here is what I have.

#include<stdio.h>
#include<conio.h>
#include<time.h>
void...
8. ## Thread: Bytes

by ramayana
Replies
10
Views
1,393

### An integer(default in type) type occupies the...

An integer(default in type) type occupies the whole word length of a computer as it's storage . Hence , for a 16 bit computer(my case) one integer occupies 16 bits or convinently 2 bytes. For an...
9. ## Thread: C Book Recommendations

by ramayana
Replies
160
Views
278,908

### Sticky: ANSI C - E . Balagurusumy...

ANSI C - E . Balagurusumy

This is the best C primer book especially if you get hold of the latest edition. Especially good for learning the basics of the language as all possible syntax of any new...
10. ## Thread: Queues

by ramayana
Replies
22
Views
3,252

### Yes there is ...we are required to implement...

Yes there is ...we are required to implement queues using array here ...I know this would increase the code length as using link list to implement the same problem is rather easy ....but this is the...
11. ## Thread: Queues

by ramayana
Replies
22
Views
3,252

### ok will keep it in mind, still the problem though...

ok will keep it in mind, still the problem though remains unresolved
12. ## Thread: Queues

by ramayana
Replies
22
Views
3,252

### Sorry but this is the smallest main function I...

Sorry but this is the smallest main function I could manage...May be it can be further decomposed into smaller functions but being an absolute rookie in C (my experience with C is as of today 15 days...
13. ## Thread: Queues

by ramayana
Replies
22
Views
3,252

### Queues

Hello , I'm suppposed to make three queues and then insert,delete and display items in them according to a given priority
So, if the user enters priority as 1/2/3 then I'm supposed to...
14. ## Thread: help with my code

by ramayana
Replies
12
Views
1,139

### Oh thanks now i understand

Oh thanks now i understand
15. ## Thread: help with my code

by ramayana
Replies
12
Views
1,139

### M friend got my code corrected, there are two...

M friend got my code corrected, there are two changes that he made....

fprintf(fp,"%d %s %d %d %d ",st.usn,st.name,st.marks1,st.marks2,st.marks3);
/* blank space between the control strings*/...
16. ## Thread: help with my code

by ramayana
Replies
12
Views
1,139

### As i said I've reformatted my code ...the code...

As i said I've reformatted my code ...the code I've used before was wrong i know it ...I'd posted above the correct code after your advice

void display(FILE*fp)
{
STD st;/*declares...
17. ## Thread: help with my code

by ramayana
Replies
12
Views
1,139

### My apologies ....when I said I'm posting the...

My apologies ....when I said I'm posting the "reformed" code i"d posted infact a code that was still half done ......
This is the code which I'd written after the advice .....

/* DS lab...
18. ## Thread: help with my code

by ramayana
Replies
12
Views
1,139

### Thanks a lot ....sorry for the crappy code but...

Thanks a lot ....sorry for the crappy code but the text editor I use
is crappy itself and this is the best I could managae.

My compiler would issue a "function should return value" if i use int...
19. ## Thread: help with my code

by ramayana
Replies
12
Views
1,139

### Thanks a lot .... But I'm still having problem...

Thanks a lot .... But I'm still having problem with my program..With your advice i have reformed my code as follows

/* DS lab program 1*/
#include<stdio.h>
#include<conio.h>...
20. ## Thread: help with my code

by ramayana
Replies
12
Views
1,139

### help with my code

As part of my Data Structures lab I'm required to write a program
to create a sequential file to store the following
USN(integer type) ,Name, Marks1 ,Marks2 ,Marks3

Then search using the USN for...
21. ## Thread: dynamic file handling help

by ramayana
Replies
2
Views
986

### dynamic file handling help

I'm having problem understanding the concepts of ftell(),fseek etc.
i need to know
a)the general syntax of ftell() is ....n=ftell(file_pointer);
supppose for a file to which i have already...

by ramayana
Replies
4
Views
2,016

heh ok
23. ## Thread: Help with program harmonic series

by ramayana
Replies
4
Views
2,016

### But 'sum' I thought is of type float and the...

But 'sum' I thought is of type float and the whole expression is
real expression and hence the right hand side of the assignment operator sum=sum+(1/deno) should be of type float ,isnt it ?
24. ## Thread: Integer and the no. of bits it occupy

by ramayana
Replies
2
Views
1,105

### Integer and the no. of bits it occupy

I"m beginning to learn C .The book I follow tells that when any variable has been declared as type int , in 32 bit computer the maximum integer that can be stored is 2147483647 while on 16
bit it is...
25. ## Thread: Help with program harmonic series

by ramayana
Replies
4
Views
2,016

### Help with program harmonic series

I have tried to code the following harmonic series as below but the progrma outputs 1.000000 only, could someone point out where the flaw is ?

1+1/2+1/3+...........+1/n

#include<stdio.h>...
Results 1 to 25 of 25