User Profile

Collapse

Profile Sidebar

Collapse
askcq
askcq
Last Activity: Feb 29 '08, 05:10 PM
Joined: Mar 16 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • askcq
    replied to functions and arrays
    in C
    Since writing the above code would be very time consuming, C permits two alternate ways of achieving the same thing. First, one might write:

    char my_string[40] = {'T', 'e', 'd', '\0',};

    But this also takes more typing than is convenient. So, C permits:

    char my_string[40] = "Ted";

    array can be intialied by anyways above.....
    See more | Go to post

    Leave a comment:


  • askcq
    started a topic functions and arrays
    in C

    functions and arrays

    void charfunc(char* );

    char* charfuncptr(cha r* );

    main()
    {
    char array[3]="ebc";

    char* narr;

    narr = array;

    charfunc(array) ;

    narr = charfuncptr(&ar ray[0]);

    printf("\nnew array is %s",narr);

    printf("\nnew array is %s",array);

    }


    void charfunc(char*...
    See more | Go to post

  • askcq
    replied to function pointers
    in C
    iam using miracle C compiler ...it was availble from net...
    it says"parse error"
    See more | Go to post

    Leave a comment:


  • askcq
    replied to function pointers
    in C
    no ..i couldnt get where is the error
    guide me...
    See more | Go to post

    Leave a comment:


  • askcq
    started a topic function pointers
    in C

    function pointers

    [code=c]#include <stdio.h>

    static int my_function(int a)
    {
    printf("my_func tion: %d\n", a);
    return (2*a + 3);
    }

    int main(void)
    {
    int (*new_function) (int) = my_function;
    int x;

    x = (*new_function) (10);
    printf("main: %d\n", x);
    return 0;
    }
    [/code]

    ...
    See more | Go to post
    Last edited by sicarie; Feb 20 '08, 07:38 PM. Reason: Code tagsa re [code=cpp] and after your code [/code]. Please use them. They want to be used. They like to be used.

  • askcq
    replied to pipes and thread in C
    in C
    yes ..iam to start with it ...
    can anyone help on this
    by saying some good material ..
    See more | Go to post

    Leave a comment:


  • askcq
    replied to vi shortcut
    in C
    for example ....to go to the end of the vi file we need to press "G "
    similar to this if anyone helps with some shortcut command it will be useful
    See more | Go to post

    Leave a comment:


  • askcq
    started a topic pipes and thread in C
    in C

    pipes and thread in C

    can anyone help to work with pipes and threads using C
    See more | Go to post

  • askcq
    replied to vi shortcut
    in C
    hi
    thanks for the reply ...
    but this editor will be used by people who work in Unix with C
    If anyone could give keyboard shortcuts for some VI commands
    it will be helpfull for me
    See more | Go to post

    Leave a comment:


  • askcq
    started a topic vi shortcut
    in C

    vi shortcut

    hi all
    i need some keyboard short cuts for VI editor
    please help
    See more | Go to post

  • askcq
    replied to pointers to Enum in C
    in C
    no its not working
    pls help
    See more | Go to post

    Leave a comment:


  • askcq
    started a topic pointers to Enum in C
    in C

    pointers to Enum in C

    [code=c]
    #include <string.h>
    enum State {yes=1, no=0}SS, *ptr;
    struct Example {
    enum State *ptr;
    }EX;

    enum State SS=yes;
    main()
    {
    struct Example* PTR;
    //enum State *ptr;
    PTR=&EX;
    ptr=&SS;
    printf("%d",PTR->ptr);
    }
    [/code]

    no errors ....but unable to print the enum values for "yes" and...
    See more | Go to post
    Last edited by sicarie; Sep 20 '07, 01:16 PM. Reason: Code tags

  • askcq
    started a topic Find version of a filesystem using C in Linux
    in C

    Find version of a filesystem using C in Linux

    how to find the version of a file using system calls in linux
    See more | Go to post

  • askcq
    replied to enum and pointer help
    in C
    how do I find the value of the next enum
    .

    is there any other method ??
    See more | Go to post

    Leave a comment:


  • askcq
    started a topic enum and pointer help
    in C

    enum and pointer help

    [code=cpp]enum state { dis =0, enable=8 }sta;
    struct SS {
    enum state *poin;
    }ss;


    main()
    {
    struct SS *str;
    str=&ss;
    printf("%d",(st r->poin));
    }
    [/code]
    how to access the enum variable through "str "
    See more | Go to post
    Last edited by sicarie; Sep 18 '07, 01:20 PM. Reason: Code tags

  • askcq
    replied to lookup table
    in C
    hi
    thanks for reply
    still I need some logic to start with
    please guide
    See more | Go to post

    Leave a comment:


  • askcq
    started a topic lookup table
    in C

    lookup table

    hi
    it will be helpful if anyone guides me how to write a lookup table in C,
    iam new to it...
    See more | Go to post

  • askcq
    replied to difference
    in C
    hi ...
    macro will be processed only during compilation and errors in macro will not be found by compiler...
    See more | Go to post

    Leave a comment:


  • askcq
    replied to atoi
    in C
    no error it shows while compilation , but after run there is no output ...

    iam running this program using VI editor in linux
    See more | Go to post

    Leave a comment:


  • askcq
    started a topic atoi
    in C

    atoi

    main() {

    int i;
    char* ptr ="str";
    printf("%d",ato i(ptr));

    }

    no output is produced ...
    pls tell me the problem ...
    See more | Go to post
No activity results to display
Show More
Working...