Search:

Type: Posts; User: kiruthika

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: pow function

    by kiruthika
    Replies
    5
    Views
    1,125

    Get the value for the number and power value from...

    Get the value for the number and power value from the user.
    Then multiply the given number according to the given power value.
    Example:
    =======
    Enter the base :2
    Enter the power value :3
    Then...
  2. Thread: input in C?

    by kiruthika
    Replies
    6
    Views
    1,370

    int main () { char c[21]; int ...

    int main () {
    char c[21];
    int i=0;
    while (scanf("%c",&c[i])!=EOF) {
    printf("%c",c[i++]);
    }
    }
  3. Replies
    5
    Views
    5,670

    Remove the curly brace in udpserver.c in the...

    Remove the curly brace in udpserver.c in the following line.


    } while (sizeof(currentTime) >= 0);

    Remove the curly brace ('}') in the above line.
    Then in the sendto function pass the...
  4. Replies
    13
    Views
    1,437

    What input you have given for the following,...

    What input you have given for the following,
    Please select a store (1-3):
    Here if you give the value which is not between 1-3 then it will give the error "Invalid option".
  5. Replies
    13
    Views
    1,437

    You use the %.2f format specifier in printf...

    You use the %.2f format specifier in printf inside the switch cases instead of %.2d.
    Your code,


    printf("\nDel Mar Sales Tax: $%.2d\n", totaltax1);

    Change it like the following.

    ...
  6. Replies
    13
    Views
    1,437

    Remove the single quotes in the switch case. I...

    Remove the single quotes in the switch case.
    I have modified your program into the following.
    Try with that.


    #include <stdio.h>
    #include <stdlib.h>

    int main ()
  7. Replies
    12
    Views
    5,898

    Change your loop like the following. Your code,...

    Change your loop like the following.
    Your code,


    for (i = 0; i < 10000000; i++) {
    intArray[100] = i;
    }

    Change it like the following.
  8. Replies
    9
    Views
    1,323

    Answer for your first question. If you used...

    Answer for your first question.

    If you used fscanf() to read content from the file, then use like the following.


    fscanf(fp,"%[^\n]",s);
  9. Replies
    9
    Views
    1,323

    If you want to get the number of scores in a file...

    If you want to get the number of scores in a file try the followings.


    #include<stdio.h>
    int main()
    {
    FILE *fp=popen("wc -l score.txt","r");
    int n;
    ...
  10. Replies
    9
    Views
    3,325

    Nothing big problem here. Actually you have...

    Nothing big problem here.
    Actually you have closed the main() function before printf statement.
    So correct that one.
    It will work correctly.

    Problem in your code


    }
  11. Replies
    5
    Views
    2,351

    void specifies no arguments. ...

    void specifies no arguments.




    #include<stdio.h>
    #include<stdlib.h>
    static int i=1;
    int main()
    {
  12. Use strcmp function to compare the strings. ...

    Use strcmp function to compare the strings.

    And use the fgets statement inside a while loop.So that you can traverse the entire file content.

    Try like this,


    ...
  13. Replies
    4
    Views
    8,473

    In your code, char *nm; char...

    In your code,



    char *nm;
    char *addy;
    int nLength, aLength;
    int phone;

    printf("\nEnter the Name: ");
  14. Replies
    10
    Views
    9,549

    I have copied your code and I executed like the...

    I have copied your code and I executed like the followings.It worked correctly for me.



    #include<stdio.h>
    #include<malloc.h>
    main()
    {
    double **u;
    int N = 52;
  15. Replies
    7
    Views
    3,944

    Using file command also we can get the file type....

    Using file command also we can get the file type.
    Example


    #include<stdio.h>
    int main(int argc,char *argv[])
    {
    system("file filetype.c");
    system("file ."); //'.' (dot)...
  16. Replies
    7
    Views
    1,607

    I have executed your program.It worked correctly...

    I have executed your program.It worked correctly only.

    I have received the following as a output of your program.

    Output
    --------
    enter length : 2
    period is 2.836
    length is 2
  17. Replies
    9
    Views
    3,345

    I modified your program into the following.Try...

    I modified your program into the following.Try with that.




    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
  18. Replies
    4
    Views
    1,090

    Visit the following link. ...

    Visit the following link.

    <math.h>
  19. Replies
    3
    Views
    1,726

    In the structure you have declared , char...

    In the structure you have declared ,
    char *aname[MAX_LEN]
    It represents array of pointer.Whether you want this as a array of pointer or like the following.
    char aname[MAX_LEN].
    And in strcmp...
  20. Replies
    3
    Views
    1,123

    regex_t re; char patt[]="-w[0-9]*"; ...

    regex_t re;
    char patt[]="-w[0-9]*";
    char string[]="-w100";
    int status;
    regcomp(&re,patt,REG_EXTENDED);
    status=regexec(&re,string,(size_t)0,NULL,0);
    ...
  21. I am not able to understand your problem clearly...

    I am not able to understand your problem clearly with the given data.
    In the following code,


    found_match = 0; //For this ID just given - mark that it has no match

    // How would it keep...
  22. Replies
    7
    Views
    1,288

    main() { char arr[]={1,2,3,4}; ...

    main()
    {
    char arr[]={1,2,3,4};
    int number=(arr[3]-'0')-1;
    printf("%d\n",number);
    }


    '0' will take the ASCII value of zero.
    ASCII value of zero is 48.
  23. Thread: Signals

    by kiruthika
    Replies
    4
    Views
    1,465

    Trace the SIGINT signal by writing the signal...

    Trace the SIGINT signal by writing the signal handler.
    Example
    --------


    void sig_handler()
    {
    --- /*handling SIGINT*/
    ---
    }
  24. visit the following link for socket programming...

    visit the following link for socket programming in c.
    Programming in C

    Visit this link for vi text editor tutorial.
    https://engineering.purdue.edu/ECN/Support/KB/Docs/ViTextEditorTutorial
  25. Replies
    20
    Views
    2,466

    If you want to compare the values in reverse...

    If you want to compare the values in reverse order it is better to use double linked list instead of
    single linked list.
    In double linked list we can have previous and next pointers.So using...
Results 1 to 25 of 26
Page 1 of 2 1 2