What do you want to save?
Add Code snippet
New code examples
-
C 2021-11-21 03:08:14
rotate an array right in c
// C program to rotate an array cyclically #include <stdio.h> void rightRotateByOne(int arr[], int n) //function for cyclically rotating an array once { int x = arr[n-1], i; for (i = n-1; i > 0; i--) arr[i] = arr[i-1]; arr[0] = x... Add solution -
C 2021-11-20 02:02:16
string length c
/** * A PROGRAM THAT RETURNS THE LENGTH OF A STRING FROM THE USER */ #include <stdio.h> /** * _strlen - takes a string and returns its length * @i: counter variable * @*s: the string entered by the user from the terminal * Return: Length of the st... Add solution -
C 2021-11-19 03:50:08
how to get a lonng in scanf in c
long l; scanf("%ld", &l); Add solution -
C 2021-11-19 03:48:26
Write a interactive C program to find the MINIMUM array elements in a given 3X3 matrix.
#include <stdio.h> #include <limits.h> int main() { int matrix[3][3]; printf("Enter the elements one-by-one:\n"); for(int row = 0; row < 3; row++) { for(int col = 0; col < 3; col++... Add solution -
C++ 2021-11-18 14:41:15
increase the speed of cin and cout in c++
#include <iostream> int main(int argc, char **argv) { int parity = 0; int x; //you can use scanf , printf alternatively for speed std::ios::sync_with_stdio(false);// this increases the speed of i/o while (std::cin >> x) parity ^... Add solution