# Search:

Type: Posts; User: Rahul11

Page 1 of 3 1

1. ## Thread: find duplicate digit's in array

by Rahul11
Replies
12
Views
1,012

### 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. ## Thread: find duplicate digit's in array

by Rahul11
Replies
12
Views
1,012

### #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. ## Thread: find duplicate digit's in array

by Rahul11
Replies
12
Views
1,012

### 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. ## Thread: find duplicate digit's in array

by Rahul11
Replies
12
Views
1,012

### 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. ## Thread: find duplicate digit's in array

by Rahul11
Replies
12
Views
1,012

### 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. ## Thread: smallest number in given sequence

by Rahul11
Replies
10
Views
665

### 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. ## Thread: smallest number in given sequence

by Rahul11
Replies
10
Views
665

### 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. ## Thread: Program show result without extern

by Rahul11
Replies
5
Views
643

### 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. ## Thread: Program show result without extern

by Rahul11
Replies
5
Views
643

### 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. ## Thread: Program show result without extern

by Rahul11
Replies
5
Views
643

### 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. ## Thread: Does code result match with diagram

by Rahul11
Replies
1
Views
490

### 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 ?

...

by Rahul11
Replies
5
Views
1,243

### Revised code #include #include...

Revised code

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

struct Node {
int data;
struct Node *next;
};

by Rahul11
Replies
5
Views
1,243

### 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

...

by Rahul11
Replies
5
Views
1,243

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)
{
}
15. ## Thread: size of structure

by Rahul11
Replies
2
Views
774

### 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. ## Thread: printing define value

by Rahul11
Replies
2
Views
961

### 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. ## Thread: printing define value

by Rahul11
Replies
2
Views
961

### 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. ## Thread: Passing double pointer to structure

by Rahul11
Replies
9
Views
1,856

### List content 1 2 3 #include ...

List content
1
2
3

#include <stdio.h>
#include <stdlib.h>
19. ## Thread: Passing double pointer to structure

by Rahul11
Replies
9
Views
1,856

### 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. ## Thread: Passing double pointer to structure

by Rahul11
Replies
9
Views
1,856

### 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. ## Thread: Passing double pointer to structure

by Rahul11
Replies
9
Views
1,856

### 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. ## Thread: Where does structure variable store and what does it store

by Rahul11
Replies
6
Views
1,021

### 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. ## Thread: Where does structure variable store and what does it store

by Rahul11
Replies
6
Views
1,021

### #include#include typedef...

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

typedef struct{

int var1;
int var2;

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

by Rahul11
Replies
6
Views
1,021

### 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. ## Thread: can we use default keyword without switch

by Rahul11
Replies
6
Views
1,293

### 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