What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-08-29 18:01:01
php mysqli number row
<?php /* Explination The mysqli_num_rows() function is an inbuilt function in PHP which is used to return the number of rows present in the result set. It is generally used to check if data is present in the database or not. To use this function, ... Add solution -
C 2021-08-29 17:56:01
increase size of array in c
#include <stdio.h>#include <stdlib.h>int main(){//a pointer to dynamically allocated memory from the heap is returned. int *a = (int *) malloc(20 * sizeof(int));for(int i = 0; i < 20; i++)a[i] = i + 1;printf("\nThe contents of the arra... Add solution -
Go 2021-08-29 15:06:02
prints struct in custom format in golang
type T struct { a int b float64 c string } func (t *T) String() string { return fmt.Sprintf("%d____%g____%q", t.a, t.b, t.c) } func customFormat() { t := &T{ 7, -2.35, "abc" } fmt.Printf("%v\n", t) // output: 7___... Add solution -
Other 2021-08-28 05:17:02
word frequency analysis c program
#include <stdbool.h>#include <stdio.h>#include <glib.h> typedef struct word_count_tag { const char* word; size_t count;} word_count; int compare_word_count(const void* p1, const void* p2) { const word_count* w1 = p1; ... Add solution