What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-06 12:31:02
base url in php
Try this: <?php echo "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?> Learn more about the $_SERVER predefined variable. If you plan on using https, you can use this: function url(){ return sprintf( "%s://%s%... Add solution -
C 2021-09-06 00:00:02
c program to find simple interest
//Simple Interest #include <stdio.h> int main(){ int P, R, T, S; printf("Enter the principle: \n"); scanf("%d", &P); printf("Enter the rate: \n"); scanf("%d", &R); printf("... Add solution -
Other 2021-09-05 20:18:01
how to input multiple strings in c
#include<stdio.h> int main() { int n,i; char str[20][20]; // Can store 20 strings, each of length 20 scanf("%d",&n); //how many string //input each string for(i=0;i<n;i++) { scanf("%s",str[i]); } //display each strin... Add solution -
C 2021-09-05 10:25:02
how to print the first character of a string in c
#include <stdio.h> #include<string.h> int main(void) { char c[100]; scanf("%s",c); /*strlen(c) gives total length of string . string index starts from 0 last index of character is strlen(c)-1*/ int l = strlen(c)-1; ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5