• After submitting the enquiry, you will be contacted by our team.
  • Payilagam Team will get to know about your training needs.
  • They will update you how could they help you.
  • Trainers(IT Professionals) may contact you if you need any clarification.
  • Your contact information will be kept highly confidential & not be shared to 3rd Parties.
Quick Enquiry

Add Two Numbers without using Addition Operator

Most Probable Interview Question: Add two numbers without using Addition Operator by both normal and Recursion method.  The condition given here is, we should not use Addition Operator.  Let us think about other ways now as we are restricted not to use + operator. Logic is, Bitwise operator can be used for solving this problem.  First, we can take two integers variable x and y assume – They are x=5 and y=4 check the below logic while y=0 then print x take one another variable like z z=x&y  ,  x=x^y  ,  y=z<<1 We can change the x and y value in binary format likewise 5=101 and 4=100 , execution is &                              ^                   y=<<1 x  = 101                      101              z<<1 y  = 100                     100             100<<1 ———                     ——         ———– z = 100                 x=  001           y=1000 &                              ^                     y= <<1 x  = 001                      0101           y= z<<1 y  =1000                     1000          0000<<1 ———                     ——            ———– z =0000                 x= 1001         y=00000 Now ,y=0 then we will print x now x=1001 corresponding decimal value is 9 Program for Normal method : public class Eg1 { public static void main(String[] args){ int x=5,y=4,z; while(y!=0){ z=x&y; x=x^y; y=z<<1; } System.out.println(x); } } Program for Recursion Method : public class Eg { int add(int x, int y) { if (y == 0) return x; else return add( x ^ y, (x & y) << 1); } public static void main(String[] args) { Eg e = new Eg(); System.out.println(e.add(5, 7)); } }        

By |November 16th, 2017|Blogs|0 Comments

Learn Java Typecast through simple programs

Hi friend, This blog will help to better understanding of typecasting of datatypes in Java. PROGRAM: public class TypeCasting { public static void main(String[] args) { int a = 140; byte b =(byte) a; System.out.println(b); } } OUTPUT : -116 EXPLANATION: This type of type casting will have loss of data. Lets see how 140 changes into -116 by simple binary calculation. 140 decimal value convert into binary number of 16 bits integer – 16 bits value of 140 is 0000000010001100 byte – 8 bits value of 140 is 10001100 [1] 000110 – first digit represent the sign of number 1 – negative value 0 – positive value so as per above reference,we will get negative number. make the binary the 2’s complement 111001 000001 ————— 111010 ————– by adding 0 on the last digits – 1110100 convert 1000111 binary into decimal, 116 Now combine the sign and number will be result of -116

Finatel Technologies Interview Programs with Answers

Hi, This is Muthuvel. Recently, I attended Finatel Technologies Interview. Here, I am posting one of the Finatel Technologies Interview Programs with Answers. Please have a look. The program asked in Finatel is, I am given with two arrays of integers. Both the arrays are not sorted. I am requested to merge both the arrays in sorted order. One condition given is – I should not use any in built methods to sort the arrays. I tried a lot to get the output and here is my outcome. Kindly go through and let me eagerly wait for your feedback. Finatel Technologies Interview Programs with Answers public class FinatelMergeTwoArrays { public static void main(String[] args) { int[]a = {9,7,3,5,1};  // First Array, not sorted int[]b = {2,4,6,8,11,10}; // Second Array, not sorted  int[]c = new int[a.length+b.length];  // Third Array to be created  int count = 0;int v=1;  // check ‘v’ is initialized here for(int i = 0; i<a.length; i++) { c[i] = a[i];  // Adding array a’s contents to c array count++; } for(int j = 0;j<b.length;j++) { c[count++] = b[j];  // Adding array b’s contents to c array } for(int i = 0;i<c.length;i++){ for(int k=0;k<c.length;k++){ if(c[k]==v){  // verifying the value to print is ‘v’ or not.   System.out.print(c[k] + ” “);   } } v++; } } Output:  1 2 3 4 5 6 7 8 9 10 11

By |October 11th, 2017|Blogs|0 Comments


Hi, Let us have our second set of PHP Interview questions here. PHP INTERVIEW QUESTIONS 2 1) What is the latest version of PHP? 2) What is the default extension of PHP? 3) PHP should start and end with? 4) Is foreach support in PHP? 5) In which version introduced Try/Catch Exception in PHP? 6) Why we use instanceof in PHP? 7) How to declare a string variable in PHP? 8) Why we use strtotime()? 9) How to change the root directory in PHP? 10) Is PHP has multi type variable? 11) PHP can support multiple inheritance? 12) How to check a function already defined or not? 13) What is the extension of LAMP? 14) Which function is used to pick one or more random values from array? 15) What all are the two types of regular expression? 16)  What is the purpose of preg_match()? 17) Why PHP is truly cross platform? 18) How to create array in PHP? 19) How to rename the file directory? 20) What is the best way to copy a file in php? 21) Write similar syntax available like PHP. 22) How to submit your data without using submit button? 23) Can PHP embedded in XHTML? 24) How to check a cookie? 25) Write which method displays variable in url? 26) Why we use $_SESSION? 27) Whys we use getCode()? 28) Why we use $_SERVER[‘REMOTE_ADDR’]? 29) Write the error control operator in PHP. 30) How can we terminate script execution in PHP? 31) Which operator is used to concatenate string? 32) Write the extension for include the file? 33) How to create a function in PHP? 34) Why we use array_count_values()? 35) Why we use $_SERVER[‘PHP_SELF’]? 36) Why we use […]

By |October 5th, 2017|Blogs|0 Comments

Data Submission without Submit button in PHP

Hi, In this blog we are going to know about Data submission without submit button in PHP page by using JavaScript language. By using the DOM, we can get the entire input values from the form, when we click the event handling attribute “onclick” the function will be called and then post into corresponding PHP page. Here we are using the same PHP page for verifying the submitted input values. Program: <html> <head> <script> function myFunction() { document.getElementById(“myForm”).submit(); } </script> </head> <body> <form method=”post” action=”Without_button.php” id=”myForm”> <input type=”text” name=”name” /><br><br> <input type=”text” name=”mobile” /><br><br> <input type=”text” name=”age” /><br><br> </form> <div onclick=”myFunction()“>Click me</div> </body> </html> <?php $x=””; $y=””; $z=””; if(!empty($_POST[‘name‘])) { $x=$_POST[‘name‘]; echo $x. “<br>”; } if(!empty($_POST[‘mobile‘])) { $y=$_POST[‘mobile‘]; echo $y.”<br>”; } if(!empty($_POST[‘age‘])) { $z=$_POST[‘age‘]; echo $z.”<br>”; } ?> Hope, now you understand Data Submission without Submit button in PHP.  Let us have some more fun in upcoming posts.  Thanks a lot!  

By |October 5th, 2017|Blogs|0 Comments


1) What do you know about php? 2) Write different comments in php? 3) How to declare constant in php? 4) Write any four magic constants in php? 5) Write any 5 super global variable in php? 6) What is the difference between echo and print? 7) What is the difference between post and get? 8) Why we use request in php? 9) What is timestamp in php? 10) How to create, write, read and delete a file in php? 11) How to check the file in php? 12) How to validate IP address in php? 13) What is the difference between include and require? 14) Calculate the length of “PAYILAGAM”. 15)Extract “YILAG” from “PAYILAGAM”. 16) How to remove “PYM” from “PAYILAGAM”. 17) How to declare a variable in php? 18) What is the difference between print_r and var_dump 19) What is the difference between implode and explode. 20) Array: Length, combine, sort(all sortings with key and values), size, structure, shuffle, push, pop, map, reverse, search, shift, slice, unique, multi_sort, pad, compact. 21) What do you know about session and cookie. 22) How to calculate date in php? 23) How to use a global variable as a local variable. 24) Write a query for create a table in php? ( Go through All MySql queries). 25) How to connect php with mysql server. 26) How to insert a data into mysql database. 27) How to retrieve a data from database in php. 28) How to update a data in database in php. 29) How to retrieve all table from database in php. 30) How to retrieve all database from mysql server in php. 31) What is class. 32) what is object? 33) what is the […]

By |September 24th, 2017|Blogs|0 Comments

Addition of Consecutive Digits in a given Number Program

Hi, In this post, we are going to discuss Addition of Consecutive Digits in a given Number program. Add numbers by below Method We can take n numbers, For Example We can take 5, for this, we should take 1-5.  Now, we need to add the consecutive digits in the given number 5. (1+2)+(2+3)+(3+4)+(4+5)  = 24 Addition of Consecutive Digits in a given Number – Program: public class Program { public static void main(String[] args) { int result=0,i,a=0; System.out.print(“Enter the number of n value”+” “); int num; Scanner scan = new Scanner(; num = scan.nextInt(); for(i=1;i<num;i++){ int n=i; a= n+(++n); result=result+a; } System.out.println(“Total of n number is”+” ” +result); } }

By |September 24th, 2017|Blogs|0 Comments

Data Retrieval from Database in PHP – With Coding

Hi, Today we are going to know about how to retrieve data from database.  Here we are using mysql_fetch_array(); to get a particular row values. It stored all values in an array. Then we will call all values by its index names. Ok. This is our program, <?php $dbhost=”localhost”;      $dbuser=”root”;      $dbpass=””;      $conn=mysql_connect($dbhost,$dbuser,$dbpass);      mysql_select_db(“trainee”);      $result = mysql_query(“select * from details      where name=’Guhan’”);      $row= mysql_fetch_array($result); // It stores values in an array      for($i=0; $i<3; $i++)      {         echo $row[$i].”<br>”;      } ?> OUTPUT: Guhan Ganesan 979181****

By |September 12th, 2017|Blogs|0 Comments

Inserting Data in Table through PHP – With Coding

Hi, We have learned how to create table in last program. This program shows how to insert new data into the created table. Ok, Lets see the program, <?php /* Insert data into table */ $host = “localhost”; $user = “root”; $pass = “”; $connect=mysql_connect($host, $user, $pass); mysql_select_db(“trainee”); $query=”Insert into details values(‘Guhan’, ‘Ganesan’, ‘979181****’)”; $mysql=mysql_query($query); if($mysql) { echo “The Data is inserted into the table is success!!”; } ?> OUTPUT: The Data is inserted into the table is success!! /* Name Father Mobile Guhan Ganesan 979181**** */

By |September 12th, 2017|Blogs|0 Comments

Creating table in PHP – With Program

Hi, We have created a database “trainee” in last program. Now we are going to create a table inside the database “trainee”. I am assume a table name is details and columns are Name, Father and Mobile, all are having the length 20. Ok Let us go to the program, <?php /* Create New Table */ $host = “localhost”; $user = “root”; $pass = “”; $connect=mysql_connect($host, $user, $pass); mysql_select_db(“trainee”); // Select your created database to create new table $query=”create table Details(Name varchar(20), Father varchar(20), Mobile varchar(20))”; $mysql=mysql_query($query); if($mysql) { echo “New Table is created successfully”; } ?> OUTPUT: New Table is created successfully

By |September 12th, 2017|Blogs|0 Comments