What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-16 02:30:33
void *malloc( size_t size ) { //do your stuf here return ::malloc(size); }
/* malloc example: random string generator*/ #include <stdio.h> /* printf, scanf, NULL */ #include <stdlib.h> /* malloc, free, rand */ int main () { int i,n; char * buffer; printf ("How long do you want the string? "... Add solution -
Other 2022-01-23 07:55:14
how to take multiple char in C
Search Results Featured snippet from the web scanf ( %d , &n); for (i = 0; i < n; i++) { scanf ("%c", &c); printf ("%c\n", c); //printed only after all characters are read. printf ("%d\n", c); //printed only after ... 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 -
C 2021-11-13 14:28:13
ask the user if they would like to do something again in C
#include<stdio.h> int main(){ int x, y, sum; char ch; print: printf ("Enter the first number:"); scanf ("%d",&x); printf ("Enter the second number:"); scanf ("%d",&y); sum=x+y; ... Add solution -
C 2021-11-04 01:15:13
prime or composite in c using function
#include<stdio.h> int prime_composite(int num); void main() { int n,ret; printf ("Enter a number: "); scanf ("%d",&n); ret = prime_composite(n); if(ret == 2 ) printf("\nThe number is Prime\... Add solution