Posts

What are the 3 parts of a for loop?

  for loop in  C  or  C++ . In programming language a loop is used for repetition of a block of code. the syntax for a for loop is:- Syntax:- for( initialization ; condition ; increment\Decrement) { // statements inside the body of the loop. } for(i=0;i<=10;i++)   {   // body of the for loop   }   in the above syntax- the initialization statement is executed only once. then the condition expression is evaluated. if the condition expression is true, the the body of the statement of for loop will be executed. this process executed continuously whenever the condition expression is not false. if the condition expression is false the for loop is automatically terminated. And the last one is increment or decrement. the increment operator is increase the value of the initialization with 1 and decrease operator decrease the value of the initialization with 1. hope this will helped you. If you want learn more about programming language then you can visit my  blog  website.

How to insert an element in an array at particular position?

                                C   Language In C , Array is a collection of similar types of item stored at continuous memory location. In this article I will show you how to insert an element in an array in C . steps :     step 1 :- Take size of an array.     step 2 :- take three integer variable which is i , ele , loc.               i is used for 'for' loop , ele is used for inserted an element and location is used for  which  location you want to be inserted an element.           Let's Take an example of it :-              #include<stdio.h>             int main()            {            int arr[6] = {1,2,3,4,5,6};             int i , ele , loc;             printf("enter an element to be inserted :");             scanf("%d",&ele); // Read the element from user.            printf("enter location where you want to be inserted an element :");            scanf("%d",&loc); // Read the location from user.

Can you create a program that will store and calculate the sum of 5 numbers entered by the user using arrays?

Image
        In   C   Programming   Language .        How can we create a array program to store and calculate the sum of 5 numbers entered           by the user. I will show you how can you do it. Steps:- Step 1:- Read the array size and store it in a variable. Step 2:- Take a variable sum. The sum variable add the all element in the array and you always remember the sum variable start with 0 value. if you take the sum value ‘1′ the expected output will increase by 1. Step 3:- scanf function read the entered element and store in the the array variable a[ i ] . by using for loop. Step 4:- take i variable which is used for  “for loop”. Let’s See an example of it:-                   

How can I find the index of an item in a multidimensional array?

Image
Find The Index Of  An Item In C Language Using Multidimensional  Array   In C programming language allowed  multidimensional array . The general form of the multidimensional array is-             Type Arr[Size1][Size2]……..[SizeN]; It is the declaration of N size array. The simplest form of the multidimensional array is the two dimensional array. I will show you how to declare 2 dimensional array.             Type ArrName [a][b];     Accessing/Find two dimensional array Element:- An element in a two dimensional array is accessed by using row index and column index of the array. For example:-

How do I disable the radio button using JavaScript?

  Disable property in  JavaScript The  disabled  property returns whether a radio button should be disable or not. A disable element is unsuable and un-clickable. Syntax: -  radioObject.disabled set the disable property:- radioObject.disable = false\true True :-  The radio button is disable. False :-  The radio button is not disable. Let’s See an example of it: - <!DOCTYPE html>   <html>   <body>   Radio Button: <input type="Radio" id="myRadio"><br>   <p> click the "submit" button to disable the radio button.</p>   <button onclick="myFunction()">submit</button>   <script>   function myFunction(){   document.getElementById("myRadio").disabled = true;   }   </script>   </body>   </html>  

What method can you use to add an element to an array in JavaScript?

  In   Javascript If you want to add an element to an array , there are 3 to 4 method which can be used to add an element to an array. Push Length Unshift The push and shift method can add an element at the end of the array list. let’s see an example of it. <!DOCTYPE html>   <html>   <body>     <h2>JavaScript Arrays</h2>     <p>The push method add a new element to an array.</p>     <button onclick="myFunction()">Try it</button>     <p id="proassignmenthelp"></p>     <script>   var a = [2,4,5,7,9,4];   document.getElementById("proassignmenthelp").innerHTML = a;     function myFunction() {   a.push(10);   document.getElementById("proassignmenthelp").innerHTML = a;   }   </script>     </body>   </html>  

Who is the best programmer of our time?

Image
  Gennady Korotkevich This guy has won Google’s programming contests for 6 years in a row now. At just 11 years old he was able to obtain a silver medal at International Olympiad in Informatics: a feat that even the best senior software developers and some Computer Science professors would not be able to accomplish. He then proceeded to to get gold medals in the following years, with three consecutive years achieving absolute first place. For more information of his feats check his Wiki page. This guy is to programming , what Magnus Carlsen is to chess or Terence Tao is to Math. He outclassed even the best programmers at 11 years old, and for the past few years, no one was able to get close to his programming skill. Most of the time I would expect a person to be the best in his field for a year then the honor would go to another person the following year. This is the case for almost every other sciences (Math, Physics, etc…) not for this guy, who has consistently been ranked the number