I have sorted it out .
Thanks .
Type: Posts; User: code_lover
I have sorted it out .
Thanks .
I am trying to sort names .I don,t really know whats wrong with the
below code. I will appreciate any help.Thanks.
char copy_name[sir_count];
int j;
for( counter = 0 ;...
Since arguments are strings ....Is there not any how I can pass an argument or string as a parameter to my function above ???
Greetings ,
I wrote a function that will be removing non alpha characters and copy name or word for name .My problem is I am confused how to pass the argument or string to my function so that...
Thanks , I understand that .
That shouldn't be the problem because the argc of the argument i am trying to access is not even close to the end of the file .
well thanks all .
I don,t understand . passing argv[i+2] , lets say i at that moment is 2 , then argv[i+2] is still the same with argv[4]
Please clear me on this ,Thanks
If I can't do argv[i+1] , how do I get access to the next argv if I can,t wait for the statement to return to the loop.
I get errors on the second file.
Hello can I get a help on this please, The program complied and ran , it worked and outputed something on the first file , but I get errors saying
Program received signal EXC_BAD_ACCESS, Could...
Ok.
I gat it , I thank I need to count what am trying to copy , then allocate memory for that .
I think that will solve my problem .
Thanks , I want to copy many argv , i.e i want to copy the names
mr james and john .
mr james , isaac .
the names (james, john , isaac )
my problem is that I don,t know the size of what...
Hi, Thanks for your reply.
Can you please explain this a little bit to me .
dest = malloc( strlen( argc[ x ] ) + 1 );
Is malloc allocating memory locating memory enough for one...
Hello ,
I want to copy argv as strings , I don,t know the size of the arguments .
example .
these are command line arguments
mr james and john .
mr james , isaac .
from my code .....I expected after the inner while loop ,It will return to the upper while loop ....Thats what i am confuse about!!
while(ch!=' ') {
fseek ( input_file , go , SEEK_SET );
ch=fgetc( input_file );
fputc (ch, output_file);
go++;
...
In the above code, I am only getting the last word from the input file instead of whole word.......
This is my code
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc , char **argv[ ] ) {
Can someone clear me on this .....I have a while loop inside an if statement...
while(......) { // First while loop
......;
......;
I thought I will get ideas here ,well its unfortunate !!
I understand I have to stop reading a word after i see '\n' but I am confused going from the beginning of the word to the end and copying the word!!
No reversing words not character .....
Thats why I am here ...I need idea what to do next ...
This is reading the data from input and outputing it to output but my problem here is my code is reversing every characters instead of word.....
sorry ....I forgot to post what i have done so far !!!
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
Hi all,
I am really stuck with this problem, I need help ,ideas......I am reading data from a file and outputing it to another file in a reverse mode. my problem is how to reverse each word ....