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.
Questions
What will this piece of C code print on the screen?
- Only “hello world”
- Only “hello again”
- Both (1) and (2)
- None of these
What was the codename for Windows Vista?
- NXT
- Vista
- Generation
- Longhorn
Which of the tools was not on the Vista sidebar when first booted in 2008?
- Clock
- Photo frame
- Weather
- CPU metre
Which e-mail program replaces the outlook express used in XP?
- Quick outlook
- Windows mail
- Mail explorer
- Outlook express 2007
Which of the following is not a valid function in the PHP MySQL library?
- Mysql_errno()
- Mysql_list_results()
- Mysql__result()
- Mysql_fetch_arrya()
What does BASIC stand for?
- It was the basic language that computers were built to use.
- It originally ran as basic terminal.
- It was named after Yugoslavian programmer Vladimir basic.
- It was an acronym, i.e. Beginner's All-Purpose Symbolic Instruction Code.
In most versions of BASIC, you could use a symbol as a shortcut for the print command. Which symbol would you use?
- *
- #
- ?
- $
Why are line numbers used while writing the C source code?
- To make the code easier to read.
- To indicate the start of a new line.
- They are not used.
- To maintain order of the lines at compile time.
Who are the writers of the classic manual, 'the C programming language'?
- Corrigan and Richards
- Kernighan and Ritchie
- Kerrigan and Richmond
- Carnigan and Ricky
If you wanted to capitalize the first letter of each word in a string, which function would you use?
- Strtolower()
- Strtoupper()
- Ucwords()
- Ucfirst()
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?
- Spaces are ignored and tabs have meanings.
- Both spaces and tabs have meanings
- Tabs are ignored and spaces have meaning
- Both spaces and tabs are ignored.
Is there a difference between i ++ and ++I ?
- No difference
- Sometimes there is a difference, sometimes not
- ++i is illegal
- I++ is illegal
Why do one of the simplest sorting algorithms is called bubble sort?
- It encases each element in a 'bubble' before sorting them.
- Smaller elements 'bubble' on the top.
- The designer hoped more people would use his sort if it have a cute name
- It's a mystery. Why is anything called what it is really.
In the C language, how does one can write the statement “if I not equal to zero”?
- If (i=!0)
- If (i==0)
- If (i!=0)
- If (I NOT=0)
In C programming, what does I equal at the end of the following piece (snippet) of code? i =1;
i *=5;
i +=3;
- 3
- 5
- 8
- 1
What is the 1st change that selection sort would make to this sequence to put into ascending order “3 1 4 2?
- 3 2 4 1
- 1 3 4 2
- 2 4 1 3
- 4 2 3 1
Which algorithm would work best to sort data as it arrives, one piece at a time perhaps from a network?
- Insertion sort
- Quick sort
- Merge sort
- Selection sort
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?
- Sheet
- CSS
- Style
- Script
When would it be good idea to use bubble sort?
- As a place holder, until you implement something else.
- Any of these
- In a database
- Anywhere you have a large database that needs sorting.
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?
- @link
- @media
- @import
- @include
The CSS styles can be introduced into web page in any of three places. Which of the following is not one of them?
- In a property-linked CSS file
- In the head of the document
- As a 'style' attribute in the target HTML element
- In a HTMLcomment before the target HTML element