How do you do if number is not in sequence ?
2
2 9
2 9 3
2 9 3 6
2 9 3 6 5
Type: Posts; User: gajya
How do you do if number is not in sequence ?
2
2 9
2 9 3
2 9 3 6
2 9 3 6 5
I can do that but I am looking for a function
#include<stdio.h>
int main ()
{
int i;
int array[5] = {1};
I'm trying to make static list that can add element in list. I know that's know the good way to make list but it's just experiment
only 5 digits allow in list
Program supposed to give result...
I have spent enough time to solve problem but program doesn't give expected output
#include<stdio.h>
#define CAPACITY 5
#define True 1
struct Queue {
int data[CAPACITY];...
There was some misunderstanding
#include<stdio.h>
#define CAPACITY 5
#define True 1
struct Queue {
int data[CAPACITY];
Thanks for excellent advice. I have created one function to print enqueue. I want to print enqueue a value
#include<stdio.h>
#define CAPACITY 5
#define True 1
struct Queue...
sorry but still I don't have clear idea
#include<stdio.h>
#include<stdlib.h>
#define size 10
#define True 1
I don't understand these two lines exactly what happens
#include<stdio.h>
#include<stdlib.h>
#define size 10
#define True 1
@Salem I think I have done
#include<stdio.h>
#include<stdlib.h>
struct Queue {
int data[10];
int front;
int back;
Am I doing that ?
Both pointers initially at 0
#include<stdio.h>
#include<stdlib.h>
struct Queue {
int data[10];
I think I have done
#include<stdio.h>#include<stdlib.h>
struct Queue {
int data[10];
int front;
int back;
};
Salem, Thank you
What function queueInit(struct Queue *q); supposed to do ?
I am trying to understand queue in c language. I have gone through page Programming Concepts: Queues - Wikibooks, open books for an open world
#include<stdio.h>
#include<stdlib.h>
...
I have tried to write code, see post 1 But having trouble making full code So I asked how to make a function for list
My ATTEMPT to solve problem
16008
I have already shown my code. I have only problem with code
How to make function that can add the new node between fist and last node
for example
20 40
add new value 30
list 20 30 40
add new value 50
Every function call new node will add to list. The pointer will always point to the address of the next node. when node is last node pointer will point to null. But i don't think my function is doing...
Hi,
I want to make function that add new node after previous node. if the list is empty add the first node and then add new node after previous node
#include <stdio.h>#include <stdlib.h>
...
alright I am converting logic into code but I am surprised that you did not use the else if statement
#include<stdio.h>
int main ()
{
int n = 3;
if ( n == 1 )
I shown my best making diagram I don't even know if this can happen real once I get the idea, I will try to make more diagrams
15999
I have made it flow diagram and I want understand how it would be look in code structure
15998
What would be the structure of the code for this function flow diagram ?
#include<stdio.h>...
Are all my operations correct if I want to Set, Clear and Toggle a 7 bit
clear 7th bit
1010 1001 byte
0000 0000
---------- AND logic
1000 0000
it works if I declare function before main
ohh This means that I can only use the global variable in the same file where it is declared. In this program, I have declare x in main.c , so I cannot use x in another file foo.c.
If I want to...
But my experiment is not giving such a result
result
foo.c: In function 'foo':
foo.c:3:2: error: 'x' undeclared (first use in this function)
x = 0;
^
foo.c:3:2: note: each undeclared...