Search:

Type: Posts; User: thillai_selvan

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. If you want to overwrite the buffer with the...

    If you want to overwrite the buffer with the reversed string you can use the following code


    #include <stdio.h>
    #include <string.h>
    main()
    {
    char s2[100],temp;
    FILE *fp;
    ...
  2. For reading the file into the buffer you can use...

    For reading the file into the buffer you can use fgets and fgetc functions.

    Here is a sample program using fgets function.



    #include <stdio.h>
    #include <string.h>
    main()
    {
  3. Replies
    8
    Views
    2,580

    If you want to remove the duplicate elements use...

    If you want to remove the duplicate elements use the below code


    #include <stdio.h>
    #include <stdlib.h>
    void sort(int a[],int n,int);

    int i=1;
    int data[100];
    int n;
  4. Replies
    8
    Views
    2,580

    Using insertion sorting algorithm we can sort in...

    Using insertion sorting algorithm we can sort in the following way.


    #include <stdio.h>
    #include <stdlib.h>
    void sort(int a[],int n,int);

    int i=1;
    int data[100];
    main()
  5. You try the following code #include...

    You try the following code


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

    #define BUFFER_SIZE 50

    int main()
  6. Replies
    4
    Views
    1,171

    can you place the code of the checkSwitch...

    can you place the code of the checkSwitch function. Or better briefly explain the flow of that function
  7. Replies
    18
    Views
    3,399

    You can use the following way also. ...

    You can use the following way also.


    #include<stdio.h>
    main()
    {
    int c;
    while ( (c=getchar())!= '\n' )
    {
    printf("%d\n",c);
  8. The logic of hash will be as follows A hash...

    The logic of hash will be as follows

    A hash table is made up of two parts: An array (it will be like a table which contains the data to be searched) and a mapping function, this is known as a hash...
  9. Replies
    12
    Views
    3,733

    In this code it means that copying the data in...

    In this code it means that copying the data in the source to the destination's specific offset.
    Usually if you simply used msg->data as a destination in the memcpy function it will be copied to the...
  10. Replies
    11
    Views
    23,782

    Just change the return type of main from void to...

    Just change the return type of main from void to int


    #include<stdio.h>
    #include<math.h>
    #include<limits.h>
    #include<stdlib.h>
    int main()
    {
    double pi,x,y;
  11. While printing the first character alone use %c...

    While printing the first character alone use %c instead of %s
  12. Is your requirement parsing the command line...

    Is your requirement parsing the command line arguments?
  13. Replies
    10
    Views
    9,549

    I too tried your code. Thats work for me.

    I too tried your code. Thats work for me.
  14. Replies
    6
    Views
    1,245

    Instead of ++x if you write x++ then it is giving...

    Instead of ++x if you write x++ then it is giving 125 as a correct answer in the case of CUBE(x*x*x).
    And also in case of CUBE(x*x) it is giving the result as 25
  15. Replies
    7
    Views
    1,607

    Can u tell me by which way have you compiled your...

    Can u tell me by which way have you compiled your code?
    And can you ensure that you have compiled with -lm option?
  16. Replies
    8
    Views
    1,495

    Welcome Bama... I suggest you to go through the...

    Welcome Bama...
    I suggest you to go through the following URL which lets u get familiar with two dimensional arrays.

    TWO-DIMENSIONAL ARRAYS.
  17. Replies
    8
    Views
    1,495

    Yeah. Great!!

    Yeah. Great!!
  18. Replies
    8
    Views
    1,495

    Yeah.!!! Sample: #define NUM_STUDENTS 100...

    Yeah.!!!
    Sample:



    #define NUM_STUDENTS 100
    #define NUM_TESTS 5
  19. Replies
    8
    Views
    1,495

    for( i = 0; i < NUM_STUDENTS; i++) for( j =...

    for( i = 0; i < NUM_STUDENTS; i++)
    for( j = 0; j < NUM_TESTS; j++)
    grades[i][j] = value;


    Here i is the row of the two dimensional array "grades".
    j is the column of the grades array...
  20. ** means pointer to pointer. Generally we will...

    ** means pointer to pointer.
    Generally we will have pointer to integers, pointer to characters.
    Similar to these things ** is a pointer to another pointer.

    Sample pointer to pointer declaration...
  21. Actually in a BST ( binary search tree ) each...

    Actually in a BST ( binary search tree ) each node will contain an individual values. These are considered as keys.
    The properties of the binary search trees are as follows

    The left subtree of a...
  22. Replies
    8
    Views
    3,182

    Welcome jaja... According to your query I made a...

    Welcome jaja... According to your query I made a little changes. Hope this will solve your requirement completely.



    int main(void)
    {
    int n;
    int count = 0;
  23. Replies
    8
    Views
    3,182

    add another condition with n>=5. So this will...

    add another condition with n>=5.
    So this will not include 0 now.
    the corrected code is given below



    int main(void)
    {
    int n;
    int count = 0;
  24. Replies
    6
    Views
    1,063

    printf("Process %02d of %d on %s\n", rank, size,...

    printf("Process %02d of %d on %s\n", rank, size, name);


    Kindly use like %02d in the printf as mentioned above in your code
  25. Actually you misplaced the comparison operator...

    Actually you misplaced the comparison operator with the assignment operator.
    if ( found_match ==0 ) like wise you need to test the condition instead of if ( found_match =0 )
Results 1 to 25 of 37
Page 1 of 2 1 2