Computer Science-spl QUESTIONS

Exam NameComputer Science-spl QUESTIONS
DescriptionComputer Science-spl QUESTIONS and Answers exams contains the questions from various competitive exams.These questions are the part of previous year paper.These kind of questions would be helpful in preparing for exams like IAS, PCS, UPSC, NDA, CDS SSC, RRB, PSC, IBPS

Back to Parent Category
Create QuestionPDF   Start Exam
Question: What would be the output of the following statements?
var object1 = { same: 'same' };
var object2 = object1;
console.log(object1 === object2);

Answer:Logs true

Question: How a constant is defined in a PHP script?

Answer:The define() directive lets us defining a constant as follows:

define (“ACONSTANT”, 123);

Question: What is DBMS ?

Answer:Database management system is a collection of programs that enables user to store, retrieve, update and delete information from a database.

Question: What are the ways of making comments in JavaScript?

Answer:// is used for line comments
ex:- var x=10; //comment text

*/ is used for block comments

Question: What are Primary Keys and Foreign Keys?

Answer:Primary keys are the unique identifiers for each row. They must contain unique values and cannot be null. Due to their importance in relational databases, Primary keys are the most fundamental aspect of all keys and constraints. A table can have only one primary key.

Foreign keys are a method of ensuring data integrity and manifestation of the relationship between tables.

Question: What is needed to be able to use image function?

Answer:GD library is needed to be able execute image functions.

Question: What is Collation?

Answer:Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence with options for specifying case sensitivity, accent marks, Kana character types, and character width.

Question: What does the unlink() function means?

Answer:The unlink() function deletes a file.

This function returns TRUE on success, or FALSE on failure.

Question: What is S3? What is it used for? Should encryption be used?

Answer:S3 stands for Simple Storage Service. You can think of it like ftp storage, where you can move files to and from there, but not mount it like a filesystem. AWS automatically puts your snapshots there, as well as AMIs there. Encryption should be considered for sensitive data, as S3 is a proprietary technology developed by Amazon themselves, and as yet unproven vis-a-vis a security standpoint.

Question: Who among the following introduced the world's first laptop computer in the market ?


Question: What is the main difference between PHP 4 and PHP 5?

Answer:PHP 5 presents many additional OOP (Object Oriented Programming) features.

Question: What is the difference between session_unregister() and session_unset()?

Answer:The session_unregister() function unregister a global variable from the current session and the session_unset() function free all session variables.

Question: How do you change the style/class on any element using JavaScript?

Answer:document.getElementById(“myText”).style.fontSize = “10";


document.getElementById(“myText”).className = “anyclass”;

Question: The Ist Computer University of India is -

Answer:Rajiv Gandhi Computer University

Question: what is the difference between Exception::getMessage and Exception::getLine ?

Answer:Exception::getMessage lets us getting the Exception message and Exception::getLine lets us getting the line in which the exception occurred.

Question: How can JavaScript be used to personalize or tailor a Web site to fit individual users?

Answer:JavaScript allows a Web page to perform "if-then" kinds of decisions based on browser version, operating system, user input, and, in more recent browsers, details about the screen size in which the browser is running. While a server CGI program can make some of those same kinds of decisions, not everyone has access to or the expertise to create CGI programs. For example, an experienced CGI programmer can examine information about the browser whenever a request for a page is made thus a server so equipped might serve up one page for Navigator users and a different page for Internet Explorer users. Beyond browser and operating system version, a CGI program can't know more about the environment. But a JavaScript-enhanced page can instruct the browser to render only certain content based on the browser, operating system, and even the screen size.

Scripting can even go further if the page author desires. For example, the author may include a preference screen that lets the user determine the desired background and text color combination. A script can save this information on the client in a well-regulated local file called a cookie. The next time the user comes to the site, scripts in its pages look to the cookie info and render the page in the color combination selected previously. The server is none the wiser, nor does it have to store any visitor-specific information.

Question: How can you pass a variable by reference?

Answer:To be able to pass a variable by reference, we use an ampersand in front of it, as follows $var1 = &$var2

Question: What is an AMI? How do I build one?

Answer:AMI stands for Amazon Machine Image. It is effectively a snapshot of the root filesystem. Commodity hardware servers have a bios that points the the master boot record of the first block on a disk. A disk image though can sit anywhere physically on a disk, so Linux can boot from an arbitrary location on the EBS storage network.

Question: What is JavaScript?

Answer:JavaScript is a scripting language most often used for client-side web development.

Question: What is User-defined Functions? What are the types of User-defined Functions that can be created?

Answer:User-defined Functions allow defining its own T-SQL functions that can accept zero or more parameters and return a single scalar data value or a table data type.

Different Types of User-Defined Functions created are as follows:

Scalar User-defined Function

A scalar user-defined function returns one of the scalar data types. Text, ntext, image and timestamp data types are not supported. These are the type of user-defined functions that most developers are used to in other programming languages.

Inline Table-Value User-defined Function

An Inline table-value user-defined function returns a table data type and is an exceptional alternative to a view as the user-defined function can pass parameters into a T-SQL select command and in essence provide us with a parameterized, non-updateable view of the underlying tables.

Multi-Statement Table-Value User-defined Function

A multi-statement table-value user-defined function returns a table, and it is also an exceptional alternative to a view as the function can support multiple T-SQL statements to build the final result where the view is limited to a single SELECT statement. Also, the ability to pass parameters into a T-SQL select command or a group of them gives us the capability to in essence create a parameterized, non-updateable view of the data in the underlying tables. Within the create function command, you must define the table structure that is being returned. After creating this type of user-defined function, It can be used in the FROM clause of a T-SQL command unlike the behavior encountered while using a stored procedure which can also return record sets.