Search:

Type: Posts; User: Rahul11

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    3,915

    beyonds this I don't understand how to do it ...

    beyonds this I don't understand how to do it


    #include<stdio.h>
    int main ()
    {
    int i = 0;


    int Digits[ ] = {1, 1, 1, 1, 1, 3, 4, 4, 4};
  2. Replies
    12
    Views
    3,915

    #include int main () { int Digits[...

    #include<stdio.h>

    int main ()
    {
    int Digits[ ] = {1, 1, 1, 2, 2, 3, 4, 4, 4};

    int current, previous, i;

    int count1;
    previous = Digits[0];
  3. Replies
    12
    Views
    3,915

    How to do with second approach ? previous = 1...

    How to do with second approach ?

    previous = 1
    current = 1

    bothe are same count1 = 1

    previous = 1
    current = 1
  4. Replies
    12
    Views
    3,915

    I need to count as long as the value of digit...

    I need to count as long as the value of digit remain same. I don't understand how to implement this in programming
  5. Replies
    12
    Views
    3,915

    find duplicate digit's in array

    I am trying to write c program to find duplicate digit's in array

    something look's like this
    Digits = [ 1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5 ]

    Digit 1 display 3 times
    Digit 2 display 2 times ...
  6. Replies
    10
    Views
    3,265

    Thanks to all for showing different approach ...

    Thanks to all for showing different approach



    we assume that first number in the array is smallest number. That's why we are not comparing. It's not good idea to compare same number in twice
    ...
  7. Replies
    10
    Views
    3,265

    smallest number in given sequence

    I am trying to find smallest number for every given sequence

    Here is program I wrote but it is not showing me the as I want

    I am stuck with function


    #include <stdio.h>

    void...
  8. Replies
    5
    Views
    3,101

    I am surprised because I am accessing a variable...

    I am surprised because I am accessing a variable x that is declared in another source file file1.c without extern

    main.c


    #include <stdio.h>
    #include "file1.h"

    int main() {
    x = 6;
  9. Replies
    5
    Views
    3,101

    I have declared variable x in main.c file. I want...

    I have declared variable x in main.c file. I want to access this variable in another file FileA.c. That's why i used extern storage class


    #include <stdio.h>
    extern int x;

    int main...
  10. Replies
    5
    Views
    3,101

    Program show result without extern

    I am wondering how program is showing correct output without external storage external class in source files because I have two source file

    main.c

    #include <stdio.h>
    void fun ();
    ...
  11. Replies
    1
    Views
    2,401

    Does code result match with diagram

    I wrote code for linked list and drawn diagram for list to show behavior. I just want to verify that description shown in picture match with code. Does it really match ?


    ...
  12. Replies
    5
    Views
    8,944

    Revised code #include #include...

    Revised code


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

    struct Node {
    int data;
    struct Node *next;
    };
  13. Replies
    5
    Views
    8,944

    I know what is double pointer but I don't...

    I know what is double pointer but I don't understand how double used in linked list


    In this example I have pointer P that point to first member of list. All the memory location are temporary

    ...
  14. Replies
    5
    Views
    8,944

    double pointer in LinkedList

    I've seen many example of linked list in which double pointer is used in a function to add the node in list





    void addNodetoList(struct Node **node, int x)
    {
    //additional code //
    }
  15. Replies
    2
    Views
    2,976

    size of structure

    one int variable occupy 4 byte and one char variable occupy 1 byte. In my code I store one int and char variable using structure


    #include <stdio.h>

    struct S
    {
    int x;
    char y;
    }s1;
  16. Replies
    2
    Views
    5,809

    Really I made silly mistake I didn't notice this...

    Really I made silly mistake I didn't notice this is happening because of the format specifier
  17. Replies
    2
    Views
    5,809

    printing define value

    I have written three programs first two program are working as it supposed to do but i don't understand what's happening in last program

    Program 1


    #include<stdio.h>


    #define value 'A'
  18. Replies
    9
    Views
    7,495

    List content 1 2 3 #include ...

    List content
    1
    2
    3



    #include <stdio.h>
    #include <stdlib.h>
  19. Replies
    9
    Views
    7,495

    I completely understand pointer, dynamic memory...

    I completely understand pointer, dynamic memory allocation and structure. I am only having trouble to pass pointer to structure in function, to return pointer in function, to pass double pointer to...
  20. Replies
    9
    Views
    7,495

    The idea was to test the code that pass...

    The idea was to test the code that pass dynamically allocated double pointer to structure type struct to function

    so far I wrote and tested code that pass pass dynamically allocated pointer to...
  21. Replies
    9
    Views
    7,495

    Passing double pointer to structure

    I found below function on this page Linked List | Set 2 (Inserting a node) - GeeksforGeeks I don't how its working

    double pointer of structure being passed to this function


    /* Given a...
  22. I want to modify the value of structure member...

    I want to modify the value of structure member without modifying actual address. I have written function but It doesn't works as expected


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

    typedef...
  23. #include#include typedef...

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


    typedef struct{

    int var1;
    int var2;

    } svar;
  24. Where does structure variable store and what does it store

    I am trying to figure out Where does structure variable store and what does it store using printf statement

    I have written this code


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


    typedef struct{
  25. Replies
    6
    Views
    4,805

    Thank you laserlight for answering my question

    Thank you laserlight for answering my question
Results 1 to 25 of 66
Page 1 of 3 1 2 3