Results 1 to 11 of 11

Thread: !

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User gugutkov's Avatar
    Join Date: Jun:2006
    Location: Pazardjik
    Posts: 114

    Cool !

    !
    :
    : 2 !
    !
    !
    Last edited by gugutkov; 1st December 2006 at 11:33.
    , DARKSTAR RULZZZ

  2. #2
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    
    int myfun(const void *a, const void *b)
    {
    	return strcmp(*(const char **)a, *(const char **) b);
    }
    
    int main(void)
    {
    	char word[1000];
    	char *allwords[1000];
    	FILE *f1, *f2;
    	int k = 0, i;
    
    
    	f1 = fopen("file1.txt", "wt");
    	f2 = fopen("file2.txt", "wt");
    	
    	while (1 == scanf("%s", word)) {
                    if (!strcmp(word, "stop")) break;
    		fprintf(f1, "%s ", word);
    		fprintf(f2, "%s ", word);
    		allwords[k++] = strdup(word);
    	}
    	fclose(f1);
    	fclose(f2);
    	qsort(allwords, k, sizeof(char*), myfun);
    	for (i = 0; i < k; i++)
    		printf("%s\n", allwords[i]);
    	return 0;
    }
    , , . , - !
    Last edited by anrieff; 1st December 2006 at 11:58. Reason: , .
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  3. #3
    Registered User gugutkov's Avatar
    Join Date: Jun:2006
    Location: Pazardjik
    Posts: 114
    " ! ?
    ? , !
    . ".
    Last edited by gugutkov; 1st December 2006 at 08:05.
    , DARKSTAR RULZZZ

  4. #4
    XaMaB's Avatar
    Join Date: Nov:2001
    Location:
    Posts: 20,387
    :
    "" . "", " " .
    : XaMaB; . 0.42

    In God we Trust (all others must submit a X.509 certificate). , ()

  5. #5
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    , Ctrl-D. - "stop".

    .

    ? ? , . Notepad, ?

    , , ., .
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  6. #6
    XaMaB's Avatar
    Join Date: Nov:2001
    Location:
    Posts: 20,387
    , ""
    : XaMaB; . 0.42

    In God we Trust (all others must submit a X.509 certificate). , ()

  7. #7
    . BobyTT's Avatar
    Join Date: Aug:2001
    Location: Up North
    Posts: 8,040
    - .

  8. #8
    Registered User singularity's Avatar
    Join Date: Apr:2003
    Location:
    Posts: 3,382
    XaMaB. 100000 " , "... -
    ignore list:Java,velio,jaredharet,gochev.george,Nit rogenium
    Quis custodiet ipsos custodes?

  9. #9
    Registered User gugutkov's Avatar
    Join Date: Jun:2006
    Location: Pazardjik
    Posts: 114
    ", , ! , ! ! , , ! !

    - 2 ; , , !"
    Last edited by gugutkov; 2nd December 2006 at 00:06.
    , DARKSTAR RULZZZ

  10. #10

  11. #11
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    ... ...
    ------4-5-----------------

    ... , ...
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |