This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Why is Profit and loss appropriation account prepared? |
|
Answer» The profit and loss appropriation account is an extension of profit and loss account prepared for the purpose of adjusting the transactions relating to amounts due to and amounts due from partners. It is nominal account in nature. The balance being the profit or loss is transferred to the partners’ capital or current account in the profit sharing ratio. |
|
| 2. |
Which of the following is shown in Profit and loss appropriation account? (a) Office expenses (b) Salary of staff (c) Partners’ salary (d) Interest on bank loan |
|
Answer» (c) Partners’ salary |
|
| 3. |
When fixed capital method is adopted by a partnership firm, which of the following items will appear in capital account? (a) Additional capital introduced (b) Interest on capital (c) Interest on drawings(d) Share of profit |
|
Answer» (a) Additional capital introduced |
|
| 4. |
The partners share the …. of the business. |
|
Answer» The partners share the Profit and losses of the business. |
|
| 5. |
Which of the following items, does not appear in the profit and loss appropriation account? (a) Salaries to partners (b) Interest on capital (c) Interest on drawings (d) Drawings |
|
Answer» (d) Drawings |
|
| 6. |
Interest capital is calculated as the ….(a) opening capital (b) closing capital (c) Both |
|
Answer» (a) opening capital |
|
| 7. |
Life Membership Free received by NPO is accounted asA. Revenue ReceiptB. Capital ReceiptC. As an AssertD. None of these |
| Answer» Correct Answer - B | |
| 8. |
State the type of skewness for a frequency distribution where (Q3 – Q2) < (Q2– Q1) |
|
Answer» If in any frequency distribution of (Q3 – Q2) < (Q2 – Q1) then, the frequency distribution is negatively skewed. |
|
| 9. |
If Q3 + Q1 = 125 and M = 62.5, for a set of data, what can be said about its skewness? |
|
Answer» Q3 + Q1 = 125, M = 62.5 2M = 2 (62.5) = 125 Q3 + Q1 = 2M Therefore, frequency – distribution is symmetric. |
|
| 10. |
Write a note PHP MySQL database connection? |
|
Answer» Database Connections: Before accessing MySQL Database, connect to Database Server machine via PHP scripting language using Mysqli_connect() Function. Syntax: mysqli_connect(“Server Name” , “User Name” , “Password” , “DB Name”); This function requires four parameters to connect to database server. Database Server name, Database username, password and Database Name. Managing Database Connections: The below code snippet describes managing database connection methods and features. <?php $servername = “localhost”; $username = “username”; $password = “password”; $DBname = “SchoolDB”; // Create connection $conn = mysqli_connect($servemame, Susername, Spassword,$DB_name). |
|
| 11. |
Which is the not a correct MySQL Function in PHP?(a) Mysqli_connect( ) Function (b) Mysqli_close( ) Function(c) mysqli_Select_data( ) Function(d) mysqli_affected_rows( ) Function |
|
Answer» (c) mysqli_Select_data( ) Function |
|
| 12. |
Explain the Database error handling and management process in PHP? |
|
Answer» Managing Database Connections: The below code snippet describes managing database connection methods and features. <?php $servemame = “localhost”; $username = “username”; $password = “password”; $DBname = “SchoolDB”; // Create connection Sconn = mysqli_connect($servemame, Susername, Spassword,SDBname); // Check connection if (! Sconn) { die(“Ccnnection failed: “ . mysqli_connect_error( )); }. echo “Connected successfully”; ?> In the above code snippet, three variables are used to connect to the Database server. They are 1. $servemame → Database Server IP address 2. $usemame → Database Server User Name 3. $password → Database Server Password 4. $DB_Name → Database Name The mysqli_connect function uses these variables and connect Database server from PHP scripting. If connection gets fail, output will be printed with MySQL error code. Otherwise connection is success. |
|
| 13. |
Explain MySQLi Queries with examples? |
|
Answer» Performing Queries: The main goal of MySQL and PHP connectivity is to retrieve and manipulate the data from MySQL database server. The SQL query statements are helping with PHP MySQL extension to achieve the objective of MySQL and PHP connection. “mysqli_query” is a function, helps to execute the SQL query statements in PHP scripting language. Syntax: mysqli_query(“Connection Object” “SQL Query”) Example: $con=mysqli_connect(“localhost” , “my_user” , “my_pass word” , “Student_DB”); $sql= “SELECT student_name,student_age FROM student”;mysqli_query($con,$sql); Closing Connection: mysqli_close( ) Function is used to close an existing opened database connection between. PHP scripting and MySQL Database Server. Syntax: mysqli_close(“Connection Object”); <?php $con=mysqli_connect(“localhost” , “$user” , “$password” , “SCHOOLDB”); // ….some PHP code… mysqli_close($con); ?> Example of PHP and MySQL Program: <?php $servemame = “localhost”; $usemame = “username”; $password = “password”; $dbname = “schoolDB”; $connection = mysqli_connect(“$servemame” , “$usemame”,“$password” “$dbname”); if (mysqli_connect_error ( )) { echo “Failed to connect to MySQL:” mysqli_connect_error( ); } sql stmt = “SELECT * FROM mycontacts”; //SQL select query $result = mysqli_query($connection,$sql_stmt);//execute SQL statement$rows = mysqli__num_r°ws($result);// get number of rows returned if($rows) { while ($row = mysqli_fetch_array($result)) { echo ‘ID:’. $row[‘id’]. ‘<br>'; Example - Object Oriented style Perform query against a database: $mysqli = new mysqli("localhost","my_user","my_password","my_db"); // Check connection. if ($mysqli -> connect_errno) { echo "Failed to connect to MySQL: " . $ |
|
| 14. |
How many parameter are required for MYSQLi connect function in PHP?(a) 2 (b) 3 (c) 4 (d) 5 |
|
Answer» 4 parameter are required for MYSQLi connect function in PHP |
|
| 15. |
Define mysqli_connect_error( ) Function? |
|
Answer» mysqli connect_error( ): It returns the error description from the last connection error. Syntax: mysqli_connect_ertror( ): |
|
| 16. |
Define mysqii_affected_rows( ) Function? |
|
Answer» mysql i_affected_rows( ): mysqli_affected_rows( ) returns the number of affected rows in the previous MYSQL operation. Syntax: mysqli_affected_rows(connection) |
|
| 17. |
Which is the correct function-to establish Connection in PHP?(a) mysqli_connect(“Server Name” , “User Name” , “Password” , “DB Name”);(b) connect(“Server Name” , “User Name” , “Password” , “DB Name”);(c) mysql_connect(“Server Name” , “User Name” , “Password” , “DB Name”);(d) mysqli connect (“Database Object”); |
|
Answer» (a) mysqli_connect(“Server Name” , “User Name” , “Password” , “DB Name”); |
|
| 18. |
What is mysqli_fetch_assoc( ) Function? |
|
Answer» mysqli_fetch_assoc( ); Fetches a result row as an associative array. Syntax: mysqli_fetch_assoc(result); |
|
| 19. |
How many parameter are required for MYSQLi query function in PHP?(a) 2(b) 3 (c) 4 (d) 5 |
|
Answer» 2 parameter are required for MYSQLi query function in PHP |
|
| 20. |
Write the Syntax for MySQLi Queries? |
|
Answer» Syntax: mysqli_query(“Connection Object’’ , “SQL Query”) |
|
| 21. |
Which one of the following statements instantiates the mysqli class?(a) mysqli = new mysqli( )(b) $mysqli = new mysqli( )(c) $mysqli->new.mysqli( )(d) mysqli->new.mysqli( ) |
|
Answer» (b) $mysqli = new mysqli( ) |
|
| 22. |
Which is the correct function Closing Connection in PHP?(a) mysqli_close(“Connection Object”)(b) close(“Connection Object”);(c) mysql_close(“Connection Object”) (d) mysqli_close(“Database Object”); |
|
Answer» (a) mysqli_close(“Connection Object”) |
|
| 23. |
What is MySQLi function? |
|
Answer» MySQLi functions: 1. The Mysqli functions allows you to access MySQL database servers. 2. For the MySQL functions to be available, you must compile PHP with support for the MySQLi extension. |
|
| 24. |
Differentiate mysqli_affected_rows( ) Function and mysqli_fetch_assoc( ) Function? |
|
Answer» Fetch assoc( ) mysqli_fetch_assoc( ): Fetches a result row as an associative array. Syntax: mysqli fetch_assoc(result) Affected rows( ) my sqli_affected_ro ws( ): mysqli affected_rows( ) returns the number of affected rows in the previous MYSQL operation. Syntax: mysqli_affected_rows(connection) |
|
| 25. |
How many parameter are required for MYSQLi Close function in PHP?(a) 1 (b) 2 (c) 3 (d) 5 |
|
Answer» 1 parameter are required for MYSQLi Close function in PHP |
|
| 26. |
which one is correct way, we can retrieve the data in the result set of MySQL using PHP?(a) mysql_fetch_row(b) mysql_fetch_array(c) mysql_fetch_object(d) All the above |
|
Answer» (d) All the above |
|
| 27. |
Give few examples of MySQLi Queries? |
|
Answer» $sql= “SELECT student_name,student_age FROM student”;mysqli_query($con,$sql); sql stmt = “SELECT * FROM my contacts”; $result = mysqli_query($connection,$sql_stmt). |
|
| 28. |
What are the types MySQLi function available PHP? |
|
Answer» Types of MySQL Functions in PHP: 1. Database connections 2. Managing Database connections 3. Performing Queries 4. Closing connection |
|
| 29. |
What are the MySQLi function available PHP? |
|
Answer» 1. Mysqli_connect( ) Function 2. Mysqli_close( ) Function 3. mysqli_select_db( ) Function 4. mysqli_affected_rows( ) Function 5. mysqli_connect_error( ) Function 6. mysqlifetchassoc( ) Function |
|
| 30. |
Write MySQL Connection Syntax with example? |
|
Answer» Syntax: mysqli_eonnect(“Server Name” , “User Name” , “password” , “DB Name”); Example: <?php Sservername = “localhost”; Susername = “username”; Spassword = “password”; $DB_name = “SchooLDB”; // Create connection $conn = mysqli_connect($servemame, Susername, Spassword,$DB_name); |
|
| 31. |
Which is the correct function to execute the SQL queries in PHP?(a) mysqli_query(“Connection Object” , “SQL Query”)(b) query(“Connection Object” , “SQL Query”)(c) mysql_query(“Connection Object” , “SQL Query”)(d) mysql_query(“SQL Query”) |
|
Answer» (a) mysqli_query(“Connection Object” , “SQL Query”) |
|
| 32. |
What is Connection string? |
|
Answer» The variables are used to connect to the Database server. They are 1. $servername → Database Server IP address 2. $usemame → Database Server User Name 3. $password → Database Server Password 4. $DB_Name → Database Name The mysqli connect function uses these variables and connect Database server from PHP scripting. If connection gets fail, output will be printed with MySQL error code. Otherwise connection is success. |
|
| 33. |
Difference between Connection and Close function? |
|
Answer» Connection: 1. Before accessing MySQL Database, connect to Database Server machine via PHP scripting language using Mysqli_ connect( ) Function. 2. This function requires 4 parameters. Close function: 1. mysqli close( ) Function is used to close an existing opened database connection between PHP scripting and MySQL Database Server. 2. This function requires only one parameter. |
|
| 34. |
Which version of PHP supports MySQLi functions?(a) Version 2.0 (b) Version 3.0(c) Version 4.0(d) Version 5.0 |
|
Answer» (d) Version 5.0 |
|
| 35. |
How Can we Create a Database Using PHP and MySQL?(a) mysqli_create_db(“Database Name”)(b) mysqli_create_db(“Data”)(c) create_db(“Database Name”)(d) create_db(“Data”) |
|
Answer» (a) mysqli_create_db(“Database Name”) |
|
| 36. |
Expand HPHP:(a) W\gh Power High Power (b) Heavy Processor Heavy Processor (c) Hip Hop (d) High Hop |
|
Answer» (c) Hip Hop |
|
| 37. |
Write a Snippet code to check database connection? |
|
Answer» // Check connection if(!$conn){ die(“Connection failed: “ . mysqli_connect_error( )); } echo “Connected successfully”; ?> |
|
| 38. |
Which of the following has written alternative version of PHP?(a) Facebook (b) Twitter (c) Instagram (d) Whatsapp |
|
Answer» Facebook has written alternative version of PHP |
|
| 39. |
What is the main goal of providing connectivity between MySql and php? |
|
Answer» The main goal of MySQL and PHP connectivity is to retrieve and manipulate the data from MySQL database server. 1. The SQL query statements are helping with PHP MySQL extension to achieve the objective of MySQL and PHP connection. 2. “mysqli_query” is a function, helps to execute the SQL query statements in PHP scripting – language. |
|
| 40. |
Name the parameters of connect functions? |
|
Answer» 1. $servemame → Database Server Server IP address 2. $username → Database Server User Name 3. $password → Database Server Password 4. $DBName → Database Name |
|
| 41. |
Explain in details types of MySQL connection method in PHP? |
|
Answer» Database Connections: Before accessing MySQL Database, connect to Database Server machine via PHP scripting language using Mysqli_connect( ) Function. Syntax: mysqli_connect(“Server Name” , “User Name” , “Password” , “DB Name”); This function requires four parameters to connect to database server. Database Server name, Database username, password and Database Name. Managing Database Connections: The below code snippet describes managing database connection methods and features<!--?php $servemame = “localhost”; $usemame = “username”; $password = “password”; SDB_name = “SchoolDB”;--> <?php $servemame = “localhost”; $usemame = “username”; $password = “password”; SDB_name = “SchoolDB”; // Create connection $conn = mysqli_connect($servemame, Susemame, Spassword,$DB_name); // Check connection if(!$conn){ die(“Connection failed: “ . mysqli_connect_error( )); } echo “Connected successfully”; ?> In the above code snippet, three variables are used to connect to the Database server. They are 1. $servemame → Database Server Server IP address 2. $username → Database Server User Name 3. $password → Database Server Password 4. $DBName → Database Name The mysqli_connect function uses these variables and connect Database server from PHP scripting. If connection gets fail, output will be printed with MySQL error code. Otherwise connection is success. |
|
| 42. |
Which is used to convert PHP code into C++? (a) LPLP (b) HPHP (c) BPBP (d) APAP |
|
Answer» HPHP is used to convert PHP code into C++ |
|
| 43. |
Write any 3 special features of PHP? |
|
Answer» 1. PHP can embed easily with HTML and client side scripting language 2. PHP has built-in function which is easily connect to MySQL database 3. PHP scripting language has been supported by many Software frameworks |
|
| 44. |
Mention some web frameworks design structures to promote rapid application development (RAD)? |
|
Answer» Some of these include PRADO, CakePHP, Symfony, Codeigniter, Laravel, Yii Framework, Phalcon and Zend Framework, offering features similar to other web frameworks. |
|
| 45. |
What is meant by malnutrition? |
|
Answer» Our diet should supply various constituents like carbohydrates, proteins, fats, viatmins and minerals in the right proportion for proper nourishment and growth. If the diet taken lacks in some constituents over a long period of time, the person does not get proper nourishment. This leads to a condition called malnutrition . Malnutrition has serious consequence on health. Lack of sufficient quantities of proteins and carbohydrates lead to stunted growth. |
|
| 46. |
Fill in the blanks with the correct words 1. Our body need ………. to perform various types of work.2. Pulses are obtained from ……….. plants.3. Spices enhance the taste and ……. of the food. 4. ……….. is the major source of calcium. |
|
Answer» 1. energy 2. leguminous 3. nutrient richness 4. Milk |
|
| 47. |
Where is energy from our body consumed? |
|
Answer» Our energy is consumed in various types of tasks, like, playing, running, digesting food, studying etc. |
|
| 48. |
From where do we get jaggery and sugar? |
|
Answer» We get jaggery and sugar from sugarcane. |
|
| 49. |
Where do we get energy from? |
|
Answer» We get energy from the food that we eat. |
|
| 50. |
What are the two main sources of food? |
|
Answer» We get food from two main sources 1. Plants 2. Animals |
|