Search:

Type: Posts; User: sangamesh

Search: Search took 0.11 seconds.

  1. Read a small segment of large array and store in small array

    I've a big char array,



    char big[100000];

    And a small array in a node of a linked list:
  2. Replies
    6
    Views
    4,534

    Using malloc instead of calloc

    Hi,

    How to get the functionality/features of calloc with malloc function. i.e. is there additional function available in C, that allows:

    calloc = malloc + additional function...
  3. Replies
    4
    Views
    1,297

    Ok. Thanks. If the program is using a pointer...

    Ok. Thanks.

    If the program is using a pointer to strutcure, why it gives error if value is assigned directly to struct elements, as follows?




    #include<stdio.h>

    typedef struct
  4. Replies
    4
    Views
    1,297

    Pointer to Structure not working

    Hi,

    In the following program, the structure "Root" is defined globally. Pointer to this structure gives compilation error.




    #include<stdio.h>

    typedef struct
  5. OpenMP: Difference between parallel & workshare constructs

    Hi,

    Wrt the openmp constructs parallel and work-share, how the following constructs work:



    1) #pragma omp for

    2) #pragma omp parallel for
  6. Replies
    3
    Views
    2,776

    A Qn on Posix threads

    Hi,

    A sample program using POSIX threads (with basic pthread functions) runs well perfectly for 1 thread/2 threads. But for more than 2 threads it fails with Segmentation fault.
    The...
  7. Replies
    2
    Views
    1,446

    Software design & development process?

    Hi All,

    Is there any tool/software to do designing of a large software(which involve multiple modules & submodules) development? Its purpose should be to interlink all the modules of the...
  8. Replies
    3
    Views
    7,593

    count strings in an array?

    Hi,

    I've a two-dimensional character array, initialized as follows:



    char *valid_help_str[] = {{"help"},{"help add queue"},{"help add queue default"},{"help add queue basic"},{"help...
  9. Replies
    6
    Views
    1,908

    The strcmp function is used in the following way:...

    The strcmp function is used in the following way:

    The char array contains set of strings.



    char* help_str[] = {"help","help one","help one two", "help one two three", "help one two three...
  10. Replies
    6
    Views
    1,908

    Compiled with "-g" option: icc -g lsub.c -o...

    Compiled with "-g" option:


    icc -g lsub.c -o lsubg

    This is the output of gdb:
  11. Replies
    6
    Views
    1,908

    Surprising Segfault

    Hi,

    I've the following code in main() function.. The scanf is written to read multiple strings in a single array of char:
    -----
    --


    else
    {
    printf("\n\n...
  12. Replies
    5
    Views
    4,777

    Thanks fronty for your suggestion. Its working...

    Thanks fronty for your suggestion. Its working with the function getuid(). Is root's uid (0) same in all linux flavours?

    Also can some one let's know, why length of ch is 5? why not 4? :confused:
  13. Replies
    5
    Views
    4,777

    popen for linux cmd output

    Hi,

    The following C program on Linux, does a set of operations based on whether user is "root" or an ordinary user.

    Using popen() function, I've tried to manipulate Linux cmd output...
  14. Replies
    11
    Views
    5,107

    Thank you all for your valuable responses. And...

    Thank you all for your valuable responses. And I'm very sorry for the late response, I was on vacation.

    Collectively, I understand that GUI devel in C++ is not suggestable. I forgot to mention, my...
  15. Replies
    11
    Views
    5,107

    gui development in C++

    Dear C++ programmers,

    For developing GUI application in C++, which additional library/framework (free) is required Or C++ itself has any graphics development libraries? I mean, a library...
  16. data manipulation between C program & linux shell

    Dear all,

    I've to develop a software, which works on the data taken from Linux shell commands. For example: manipulation of the output of ifconfig command into C/C++ program. How this can...
  17. Replies
    3
    Views
    2,089

    The call readmat(&b]) certainly should bring...

    The call readmat(&b]) certainly should bring about an error from your compiler. You really should copy and paste code, and not just re-type it. You've got a good chance of introducing errors if you...
  18. Replies
    3
    Views
    2,089

    passing uninitialized 2d array to function

    Hi,

    The below program does some operations on multiple matrices. For reading these multiple matrices, am using a function readmat().



    #include<stdio.h>
    void readmat(int *a)
    {
    ...
Results 1 to 18 of 18