ok...this is what i have done in the main
and it still doesnt work, also is my passing on correct
int main( int argc, char *argv[]) {
int a[]= {1,4,5,8,7};
int v=1;
int l, r, i;
Type: Posts; User: papermate
ok...this is what i have done in the main
and it still doesnt work, also is my passing on correct
int main( int argc, char *argv[]) {
int a[]= {1,4,5,8,7};
int v=1;
int l, r, i;
yes...
sorry i fogot to specify the error....
when i run it...theres a segmentation fault.
however, when i run it using gdb i get the following about that line
Program received signal...
Hi
i am trying to call this search function in the main,
int search(int a[], int v, int l, int r)
{ int i;
for (i = l; i <= r; i++)
return i;
return -1;
ok thanks for that
but it still doesnt work.... when i did the uninitialised the found, there was an error saying that found is uninitialised.
So is there any similar example or something?
...
ok...
its supposed to get a character from the user
then print out, in the given list, what its position is in the linked list.
so if list is A- B- C- ETC....
then B has index 1
Hi
i am trying to get a character from the user and return its position in the list.
However it does not work, and i dont really understand why. thanks for ur help
int...
so than how exactly do you print out the values of the fields of myname.
ok
now i have
and
ok...so now i have changed it to !=EOF
but still doesnt do it.
is there something wrong in my code?
I am sorry i am not a professional- or even near programmer
thnx for ur help
ok...yea i get ur point
however, if i am being asked to count how many nos are given how can i do that?
so any no can be given but we need to count them
thnx
oh i see it now
but then when i took that out it still did not print out how many there are
also since there are going to be a variable number how can i define the MAX or does it not matter? ...
Hi
i just tried that...but it still does the same job
this is the output
eg..for 4 5 6
it prints out
Hi
i dont understand why i the following code is not working
i have tried the following
#include <stdio.h>
#define MAX 20
Hi
thanks a lot for ur help!!!!
Also i am not sure how to search without using the string functions....
this is what i have so far:
void search(char text[][MAX_LEN+1], char rep[]);
hi
thnks for ur reply
i understand what u mean...
and here is my complete code
//reading the integers
Hi all
i just wanted to kno how to multiply every second digit by 2 or 3?
and then check if its in increasing order
so its:
ok...kool. thnx for that
i will used getchar to get rid of the headers.
also will that solve my problem of the data not being sorted into arrays?
here r some:
Postcode Month Year Bedrooms Price
2081 12 2007 4 795500
2180 7 2009 6 165000
2140 12 2008 5 689000
2153 3 2008 4 ...
ok done that
however i still cant do it.
if i put the scanf in that then the same thing happens like before.....
but i remove the fscanf statement then i can print my code but with no...
i changed that.....howver it prints out nothing and does nothing.
i pressed "enter" a 100 times still nothing.
when i do it without this line the program runs but no printing of the...
also for the 2009 part my code does not go through the whole of the data and prints what ever is on the last line.
why?
i have this for it:
i = 0;
while( i < n)
{
...
OK.....
i have tried that:
but i think the main prblem i am having is that my code isnt storing the data into 2d arrays......
hence it isnt printing out the info...for the year 2009....
...
this what the ouput is to be like:
+========================================+
| Postcodes Month Year Bedrooms Price |
+----------------------------------------+
| 2083 04 2010 1 ...
ok i have done that however my program does not work...
ah!!!!!!!!!!!
so this is what i did"
#include <stdio.h>
#include <string.h>
ok....
i am so sorry if i sound dumb:
but is this what i do:
instead of File *fp type stdin....
also i found this way to read the file and store in 2d: