What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-04 01:21:02
generate random string in php
/** * Generate a random string, using a cryptographically secure * pseudorandom number generator (random_int) * * This function uses type hints now (PHP 7+ only), but it was originally * written for PHP 5 as well. * * For PHP 7, random_int is a P... Add solution -
C 2021-10-02 04:48:04
Algorithm that flips sentences and numbers
#include <stdio.h> #include<string.h> int main(void) { int n,m,j; char i,t[n],d[n]; printf("enter the first word :"); gets(t); n=strlen(t); for(j=n-1;j>=0;j--){ printf("%c",t[j]); } return 0; } Add solution -
Javascript 2021-09-30 09:48:03
how to find length of string in javascript without using length method
function strLength(s) { var length = 0; while (s[length] !== undefined){ length++; } return length; } console.log(strLength("Hello")); // 5 console.log(strLength("")); // 0 Add solution -
C 2021-09-30 08:24:06
how to find length for string in c
// include all the libraries used in the program. #include <stdio.h> #include <string.h> // Calculate Length of String Using strlen() Function int main() { char a[100]; int length; printf("Enter a string to calculate its length\n&... Add solution -
Other 2021-09-27 00:08:05
infix to prefix in c
# include <stdio.h># include <string.h># define MAX 20void infixtoprefix(char infix[20],char prefix[20]);void reverse(char array[30]);char pop();void push(char symbol);int isOperator(char symbol);int prcd(symbol);int top=-1;char stack[MAX];mai... Add solution