Horje
javascript Code Example
javascript
let str = "12345.00";
str = str.substring(0, str.length - 1);
javascript
for (var i = 0; i < 3; i++) {
  setTimeout(function() { alert(i); }, 1000 + i);
}
javascript
#include <conio.h>

char main()
{
char a,bip;
a=bip;
printf("ASPRO%c\a",bip);
scanf("%c\a",&bip);
return 0;
}
javascript
#include <stdio.h>

/*function declaration
	* name		: getBinary
	* Desc		: to get binary value of decimal number
	* Parameter	: int -integer number
	* return	: void
*/
void getBinary(int);

int main()
{
    int num=0;
    printf("Enter an integer number :");
    scanf("%d",&num);
    printf("\nBinary value of %d is =",num);
    getBinary(num);
    return 0;
}

/*Function definition : getBinary()*/
void getBinary(int n)
{
    int loop;
    /*loop=15 , for 16 bits value, 15th bit to 0th bit*/
    for(loop=15; loop>=0; loop--)
    {
        if( (1 << loop) & n)
            printf("1");
        else
            printf("0");
    }
}
javascript
 // create 
TestClass.prototype.hello = function () { return 'world'; };

var tc = new TestClass('test');
console.log(tc.hello())
// world 		
javascript
<!DOCTYPE html>
    <html>
    <head>
    <link rel="stylesheet" href="js.js" type="text/Javascript">
    <link rel="stylesheet" href="css.css" type="text/css">
    </head>
    <body>
    <p id="firstParagraph">Hello world!</p>
    </body>
    </html>
 Run code snippet
JavaScript
let num = 10;

console.log(Number.isInteger(num)); // 2
Source: elzero.org
javascript
#include<stdio.h>
#include<conio.h>

void main()
{
 long int binary,hexadecimal=0,j=1,rem;


 printf("Enter a binary number:\n");
 scanf("%ld",&binary);

 while(binary!=0)
 {
  rem=binary%10;
  hexadecimal=hexadecimal+rem*j;
  j=j*2;
  binary=binary/10;
 }
javascript
406 Not Acceptable
#include<stdio.h>
int main() {
printf("hi");
return 0;}
javascript
#include <stdio.h>
#define MAX 100

//function prototypes

/*
This function will return o if 'ch' is vowel
else it will return 1
*/
char isVowel(char ch);

/*
This function will eliminate/remove all vowels
from a string 'buf'
*/
void eliminateVowels(char *buf);

/*main function definition*/
int main()
{
    char str[MAX]= {0};

    //read string
    printf("Enter string: ");
    scanf("%[^\n]s",str); //to read string with spaces

    //print Original string
    printf("Original string: %s\n",str);

    //eliminate vowles
    eliminateVowels(str);
    printf("After eliminating vowels string: %s\n",str);

    return 0;
}

//function definitions

char isVowel(char ch)
{
    if(	ch=='A' || ch=='a' ||
            ch=='E' || ch=='e' ||
            ch=='I' || ch=='i' ||
            ch=='O' || ch=='o' ||
            ch=='U' || ch=='u')
        return 0;
    else
        return 1;
}

void eliminateVowels(char *buf)
{
    int i=0,j=0;

    while(buf[i]!='\0')
    {
        if(isVowel(buf[i])==0)
        {
            //shift other character to the left
            for(j=i; buf[j]!='\0'; j++)
                buf[j]=buf[j+1];
        }
        else
            i++;
    }
}




C

Related
KeyError: "['Adult Mortality' 'infant deaths' 'Alcohol' 'percentage expenditure'] not found in axis" site:stackoverflow.com Code Example KeyError: "['Adult Mortality' 'infant deaths' 'Alcohol' 'percentage expenditure'] not found in axis" site:stackoverflow.com Code Example
transform yt video into background overlay Code Example transform yt video into background overlay Code Example
bd number regex Code Example bd number regex Code Example
arduino internal pull up resistor Code Example arduino internal pull up resistor Code Example
wpdb add temporary while drop table Code Example wpdb add temporary while drop table Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9