Software and Programming Basics

Test your knowledge of programming languages (C, PHP, BASIC), web technologies (HTML, CSS), and software history. Covers code syntax, algorithms, and software concepts.

21 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What will this piece of C code print on the screen?

Printf (“hello world”);

/*this is a comment
Printf (“hello again”); This is another comment*/
  1. Only “hello world”
  2. Only “hello again”
  3. Both (1) and (2)
  4. None of these
Question 2 Multiple Choice (Single Answer)

What was the codename for Windows Vista?

  1. NXT
  2. Vista
  3. Generation
  4. Longhorn
Question 3 Multiple Choice (Single Answer)

Which of the tools was not on the Vista sidebar when first booted in 2008?

  1. Clock
  2. Photo frame
  3. Weather
  4. CPU metre
Question 4 Multiple Choice (Single Answer)

Which e-mail program replaces the outlook express used in XP?

  1. Quick outlook
  2. Windows mail
  3. Mail explorer
  4. Outlook express 2007
Question 5 Multiple Choice (Single Answer)

Which of the following is not a valid function in the PHP MySQL library?

  1. Mysql_errno()
  2. Mysql_list_results()
  3. Mysql__result()
  4. Mysql_fetch_arrya()
Question 6 Multiple Choice (Single Answer)

What does BASIC stand for?

  1. It was the basic language that computers were built to use.
  2. It originally ran as basic terminal.
  3. It was named after Yugoslavian programmer Vladimir basic.
  4. It was an acronym, i.e. Beginner's All-Purpose Symbolic Instruction Code.
Question 7 Multiple Choice (Single Answer)

In most versions of BASIC, you could use a symbol as a shortcut for the print command. Which symbol would you use?

  1. *
  2. #
  3. ?
  4. $
Question 8 Multiple Choice (Single Answer)

Why are line numbers used while writing the C source code?

  1. To make the code easier to read.
  2. To indicate the start of a new line.
  3. They are not used.
  4. To maintain order of the lines at compile time.
Question 9 Multiple Choice (Single Answer)

Who are the writers of the classic manual, 'the C programming language'?

  1. Corrigan and Richards
  2. Kernighan and Ritchie
  3. Kerrigan and Richmond
  4. Carnigan and Ricky
Question 10 Multiple Choice (Single Answer)

If you wanted to capitalize the first letter of each word in a string, which function would you use?

  1. Strtolower()
  2. Strtoupper()
  3. Ucwords()
  4. Ucfirst()
Question 11 Multiple Choice (Single Answer)

In general (other than writing constants like 'Hello world' and a few obscure constructs) what effect does the amount of white space (space and tabs) between code elements have a C program's compiled output?

  1. Spaces are ignored and tabs have meanings.
  2. Both spaces and tabs have meanings
  3. Tabs are ignored and spaces have meaning
  4. Both spaces and tabs are ignored.
Question 12 Multiple Choice (Single Answer)

Is there a difference between i ++ and ++I ?

  1. No difference
  2. Sometimes there is a difference, sometimes not
  3. ++i is illegal
  4. I++ is illegal
Question 13 Multiple Choice (Single Answer)

Why do one of the simplest sorting algorithms is called bubble sort?

  1. It encases each element in a 'bubble' before sorting them.
  2. Smaller elements 'bubble' on the top.
  3. The designer hoped more people would use his sort if it have a cute name
  4. It's a mystery. Why is anything called what it is really.
Question 14 Multiple Choice (Single Answer)

In the C language, how does one can write the statement “if I not equal to zero”?

  1. If (i=!0)
  2. If (i==0)
  3. If (i!=0)
  4. If (I NOT=0)
Question 15 Multiple Choice (Single Answer)

In C programming, what does I equal at the end of the following piece (snippet) of code? i =1;
i *=5;
i +=3;

  1. 3
  2. 5
  3. 8
  4. 1
Question 16 Multiple Choice (Single Answer)

What is the 1st change that selection sort would make to this sequence to put into ascending order “3 1 4 2?

  1. 3 2 4 1
  2. 1 3 4 2
  3. 2 4 1 3
  4. 4 2 3 1
Question 17 Multiple Choice (Single Answer)

Which algorithm would work best to sort data as it arrives, one piece at a time perhaps from a network?

  1. Insertion sort
  2. Quick sort
  3. Merge sort
  4. Selection sort
Question 18 Multiple Choice (Single Answer)

Before using the cascading style sheet, you need to include one into your HTML page. What HTML tag can you use to apply CSS rules to a document?

  1. Sheet
  2. CSS
  3. Style
  4. Script
Question 19 Multiple Choice (Single Answer)

When would it be good idea to use bubble sort?

  1. As a place holder, until you implement something else.
  2. Any of these
  3. In a database
  4. Anywhere you have a large database that needs sorting.
Question 20 Multiple Choice (Single Answer)

The HTML'link' tag allows to include an external style sheet into your document. As if it had been defined there is in a 'style' tag. What is the equivalent rule in CSS?

  1. @link
  2. @media
  3. @import
  4. @include
Question 21 Multiple Choice (Single Answer)

The CSS styles can be introduced into web page in any of three places. Which of the following is not one of them?

  1. In a property-linked CSS file
  2. In the head of the document
  3. As a 'style' attribute in the target HTML element
  4. In a HTMLcomment before the target HTML element