What do you want to save?
Add Code snippet
New code examples
-
-
C 2022-03-20 00:01:31
how to set a pointer to an offset in c
char *ptr0 = "Hello Goodbye"; char *ptr1 = ptr0+6; // offset 6 bytes from ptr0 printf("ptr0: %s\n", ptr0); // expected output ptr0: Hello Goodbye printf("ptr1: %s", ptr1); // expected output: ptr1: Goodbye Add solution -
Other 2022-03-18 00:40:02
how to assign struct address to the pointer
#include<stdio.h> struct dog { char name[10]; char breed[10]; int age; char color[10]; }; int main() { struct dog my_dog = {"tyke", "Bulldog", 5, "white"}; struct dog *ptr_dog; ptr_dog = &a... Add solution -
Python 2022-03-17 11:15:05
python code to c code converter
#include<iostream> // Defining MAX size to 10 #define MAX 10 using namespace std; typedef struct Edge { int source; int destination; int weight; }Edge; void bellman_ford_algo(int nodevertex,Edge edge[],int source_graph,int nodeedge) { int... Add solution -
Other 2022-03-17 10:10:41
queue with linked list in c
/* * Program : Queue using linked list * Language : C */ #include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }; struct node *front = NULL, *rear = NULL; void enqueue(int val) { struct node *newNo... Add solution