You are here: Home / Topics / Page / 4

How to Check Website Availability with PHP

By Team MCQ Buddy on 30 Oct 22 | Filed under: PHP
Hello programmers, In this post, we are going to see how we can check website is active or not. We will make it possible with PHP and Curl. The following PHP script helps you to check if your website is online and available. If you want to check the status of your website, make a cURL request t

How to Generate Random String in PHP

By Team MCQ Buddy on 30 Oct 22 | Filed under: PHP
In this tutorial, we are going to see how to generate a random string in PHP. We can achieve that by storing all possible letters in a string and then generate a random index from 0 to the length of the string -1. As shown in the following code.Generate random string in php<?php 

function getR

Program for Factorial in PHP with PHP "for loop"

By Team MCQ Buddy on 30 Oct 22 | Filed under: PHP
In this post, we are going to see how to write a PHP function to calculate the factorial of a given number in PHP using for loop. The factorial of a number is the product of all integers between 1 and itself.Code<?php
  function fact($n){ 
    $f = 1; 
    for ($i = 1;

How to check if a URL is valid in PHP

By Team MCQ Buddy on 30 Oct 22 | Filed under: PHP
In this tutorial, we are going to see how to check if a URL is valid in PHP. When a URL is submitted, it is very important to check if this URL is valid or not before performing any action. Here we are going to see how to check if a URL is valid in PHP using filter_var() function with FILTER_VALIDAT

Point to be remembered while programing in C++

By Vikram Tanwar on 30 Oct 22 | Filed under: C++ Interview Questions
It is case sensitive, means it differentiates between uppercase letters and lowercase letters.Program must be written in small letters only, so keep your caps lock always off.All entered data is stored in variables. Variables are named memory locations. There are different types of variables, to be 

Data types in C++

By Vikram Tanwar on 30 Oct 22 | Filed under: C++ Interview Questions
int - to store integer data. short, long and unsigned (int, long, short) are two variety of integers which can store integer data in diferent rangesfloat - to store real numbersdouble - to store real number with more precision than floatchar - to store a single letter or symbols.To store a word or s

Header file in C++

By Vikram Tanwar on 30 Oct 22 | Filed under: C++ Interview Questions
Actually the C++ commands are defined in different file which are called header files. When we use a command we must include the header file where it is defined. We include it as #include<iostream.h> where "iostream.h" is a header file. This way we can include as many header files as we need. 

Explain South America continent

By Shyam Dubey on 24 Oct 22 | Filed under: Geography
South America is the fourth largest continent in the world by land area. And the third most populous in the world. Furthermore, it is in the southern hemisphere, with the exception of a small area of the northernmost part of the continent.Moreover, it is present completely in the western hemisphere.