References only, not question text. Open Official paper ↗ where Cambridge publishes the paper,
or see the official Cambridge past-papers page; for other papers, ask your
school. “Paper 42” means Paper 4, variant 2.
Practice questions
Original questions written by HomiLabs in the style of the exam, with answers and mark schemes. They are not
Cambridge past paper questions and have not been reviewed by Cambridge. Try each one before opening the answer.
Q1Generic file formats · Core · Paper 1 style · 4 marks
(a)Write down the most suitable generic file extension for each file.(i) Plain text with no formatting, such as a list of names.(ii) A table of data with the values separated by commas.(iii) A formatted letter that can be opened and edited in most word processors.(iv) A leaflet whose layout must look exactly the same on every computer and printer.[4]
Show answer
(a)(i) .txt(ii) .csv(iii) .rtf(iv) .pdf
1 mark each.
Q2Generic file formats · Core · Paper 1 style · 4 marks
(a)Write the full name of each file format.(i) .css(ii) .pdf(iii) .rtf(iv) .csv[4]
Q3Generic file formats · Core · Paper 1 style · 3 marks
(a)State what is meant by a .zip file.[1]
(b)Give two reasons for zipping a folder of files before emailing it.[2]
Show answer
(a) A compressed file (archive) that can contain one or more files/folders in a smaller size (lossless).
1 mark.
(b) Any two, e.g. smaller file is quicker to upload/download; may fit within the email attachment size limit; many files are sent as one attachment; uses less storage space; can be password protected.
1 mark each.
Q4Generic file formats · Core · Paper 3 style · 2 marks
A file called MARKS.csv contains lines such as:Ali Raza,Lahore,85Sara Khan,Karachi,92
(a)State what the commas in the file do.[1]
(b)Name two types of software that can open this file.[1]
Show answer
(a) They separate the values/fields in each record (each comma marks the end of one field).
1 mark.
(b) Any two of: spreadsheet; database; text editor; word processor.
1 mark for two.
Q5Generic file formats · Core · Paper 1 style · 5 marks
(a)Write down the most suitable file format for each file.(i) A photograph of Badshahi Mosque on a website.(ii) A school logo that must have a transparent background.(iii) A short looping animated banner with a few colours.(iv) A podcast episode for download.(v) A video clip of a cricket match.[5]
Q6Generic file formats · Core · Paper 1 style · 2 marks
(a)Explain why a file name has an extension such as .docx or .png.[2]
Show answer
(a) The extension tells the operating system what type of file it is and therefore which software to use to open it; it also lets the user see the file type.
1 mark each.
Q7Generic file formats · Core · Paper 1 style · 3 marks
(a)State whether each file normally stores an image, audio, video or text.(i) .png(ii) .mp3(iii) .mp4(iv) .txt(v) .gif(vi) .csv[3]
Show answer
(a)(i) Image(ii) Audio(iii) Video(iv) Text(v) Image(vi) Text (data)
All six: 3 marks; four or five: 2 marks; two or three: 1 mark.
Q8Generic file formats · Core · Paper 3 style · 3 marks
(a)You are given these files: banner.jpg, notes.txt, style4.css, map.png, logo.jpg, prices.csv. You are told to copy only the image files with a .jpg extension and the stylesheet into a new folder. List the files you copy.[2]
(b)Give one reason why web page file names should not contain spaces.[1]
Show answer
(a) banner.jpg, logo.jpg, style4.css
1 mark for both .jpg files only, 1 mark for style4.css; lose 1 mark for each extra file.
(b) Spaces can cause broken links on some web servers/browsers (they become %20 in the URL); file names must match exactly.
1 mark.
Q9Generic file formats · Core · Paper 1 style · 2 marks
(a)A college in Hyderabad publishes its examination timetable as a .pdf file on its website. Give two advantages of using .pdf.[2]
Show answer
(a) Any two, e.g. students can open it on any device without the original software; layout looks the same on every device/printer; students cannot easily change the times; small file size quick to download.
1 mark each.
Q10Generic file formats · Core · Paper 1 style · 3 marks
(a)Write down the most suitable file format for each purpose.(i) An application form attached to an email that must look the same for everyone and should not be edited.(ii) Data moved from one database package to a different database package.(iii) A file holding the colours and fonts used by every page of a website.[3]
Show answer
(a)(i) .pdf(ii) .csv(iii) .css
1 mark each.
Q11Generic file formats · Standard · Paper 1 style · 3 marks
(a)Explain why generic file formats are needed when files are shared between people.[2]
(b)Give an example of a situation where a generic file format would be used.[1]
Show answer
(a) Different people use different software/operating systems; a generic format can be opened by many different applications on any platform, so the receiver does not need the same software as the sender.
1 mark each.
(b) E.g. a school sending a timetable as .pdf to all parents; a company exporting sales data as .csv to import into a different database; sending a report as .rtf to someone with different word-processing software.
1 mark.
Q12Generic file formats · Standard · Paper 1 style · 4 marks
(a)A web designer in Islamabad is choosing between .jpg and .png files for the images on a travel website. Compare the two formats.[4]
Show answer
(a) Both are compressed image formats supported by all web browsers. JPG uses lossy compression so files are smaller and load faster, while PNG uses lossless compression so no detail is lost but files are larger; JPG suits photographs with many colours, PNG suits logos/text/diagrams with sharp edges; PNG supports transparent backgrounds whereas JPG does not; repeatedly editing and saving a JPG lowers its quality.
1 mark per comparison point, max 4.
Q13Generic file formats · Standard · Paper 1 style · 3 marks
(a)Give two uses of .gif files on websites.[2]
(b)Explain why .gif is not suitable for a detailed colour photograph.[1]
Show answer
(a) Any two, e.g. short simple animations/animated banners; small icons/buttons; simple graphics with few colours; images with a transparent background.
1 mark each.
(b) GIF can only store a limited palette of 256 colours, so photos with many shades would lose quality.
1 mark.
Q14Generic file formats · Standard · Paper 1 style · 3 marks
(a)State what type of data is stored in each format.(i) .mp3(ii) .mp4[2]
(b)Describe how an .mp3 file is made much smaller than the original recording.[1]
Show answer
(a)(i) Audio/sound (music)(ii) Video (with sound) – multimedia
1 mark each.
(b) Lossy compression removes sounds that humans cannot hear or are unlikely to notice (e.g. very high/low frequencies, quieter sounds masked by louder ones).
1 mark.
Q15Generic file formats · Standard · Paper 2 style · 4 marks
In a practical task you are given a file called NEWSLETTER.rtf to edit.
(a)Explain why you should save the file in your word processor's own format before you start editing.[2]
(b)The finished newsletter is to be sent to a printing company as a .pdf file. Give two reasons why .pdf is used.[2]
Show answer
(a) The software's own format keeps all the features you add (styles, headers/footers with automated fields, section breaks, wrapped images); some of these may be lost or changed if the document is saved as .rtf.
1 mark each.
(b) Any two, e.g. layout, fonts and images appear exactly as designed on any computer/printer; the printer does not need the same word processor; the file cannot be easily edited by mistake; the file is compact; fonts can be embedded.
1 mark each.
Q16Generic file formats · Standard · Paper 3 style · 3 marks
(a)A website uses an external stylesheet. State what is stored in the .css file and what is stored in the .htm file.[2]
(b)Write the HTML element, placed in the head section, that attaches a stylesheet called style1.css stored in the same folder as the web page.[1]
Show answer
(a) .css: the styles/presentation rules (fonts, colours, sizes, alignment) for elements; .htm: the content and structure of the page (text, tables, images, links) in HTML.
1 mark: rel="stylesheet" and href="style1.css" required; type attribute optional; filename case must match.
Q17Generic file formats · Standard · Paper 1 style · 4 marks
(a)Compare .txt and .rtf files.[4]
Show answer
(a) Both are generic text formats that can be opened by most word processors/text editors. A .txt file stores only the characters with no formatting, whereas .rtf keeps formatting such as fonts, bold, colours and alignment; .txt files are smaller; .rtf can include tables/images while .txt cannot; .txt is used for simple notes/data/code, .rtf for formatted documents shared between different word processors.
1 mark per comparison point, max 4.
Q18Generic file formats · Standard · Paper 2 style · 3 marks
(a)In a database task you are given data in .csv files to import. Explain why the data is supplied in .csv format.[2]
(b)When importing a .csv file, the first row contains the field names. State the setting you choose during import so that these become field names and not a record.[1]
Show answer
(a) CSV is a generic, plain-text format; it can be imported into any database software, whichever package the candidate uses.
1 mark each.
(b) Select 'First row contains field names/headings'.
1 mark.
Q19Generic file formats · Standard · Paper 3 style · 3 marks
(a)State what is stored in an .htm file and name one type of software that can open it.[2]
(b)A web page refers to its images using relative file paths such as <img src="camel.jpg">. Explain why the image files must be copied into the same folder when the website is moved to a new computer.[1]
Show answer
(a) The HTML code (tags and content) of a web page; opened by a web browser (or a text editor/web-authoring software).
1 mark each.
(b) A relative path tells the browser to look for the file in the same folder as the page; if the image is not there it cannot be found and will not display.
1 mark.
Q20Generic file formats · Standard · Paper 1 style · 3 marks
(a)A teacher opens the file SCORES.csv in a text editor and then in a spreadsheet. Describe what she sees in each case.[2]
(b)She had typed a formula to total the scores before saving as .csv. Explain what happens to the formula.[1]
Show answer
(a) Text editor: plain lines of text with the values separated by commas (one record per line). Spreadsheet: each value placed in its own cell, in rows and columns.
1 mark each.
(b) Only the result/value is saved; the formula itself is lost.
1 mark.
Q21Generic file formats · Challenge · Paper 1 style · 5 marks
(a)Explain the difference between lossy and lossless compression.[2]
(b)State which type of compression should be used for each file and give a reason.(i) A spreadsheet of bank account balances.(ii) A song to be streamed to mobile phones.[3]
Show answer
(a) Lossy compression permanently removes some data (detail that is least noticeable), so the original cannot be restored exactly; lossless compression reduces the file size without losing any data, so the original can be rebuilt exactly.
1 mark each.
(b)(i) Lossless – every digit must be kept exactly/losing data would change the balances.(ii) Lossy (e.g. .mp3) – much smaller file so it streams quickly using less data; the lost sounds are hard for people to hear.
(i) 1 mark for lossless with reason; (ii) 1 mark for lossy, 1 mark for reason.
Q22Generic file formats · Challenge · Paper 1 style · 4 marks
A recording of a qawwali performance is stored as a 40 MB uncompressed audio file. Converting it to .mp3 reduces the file size by 85%. Use 1 GB = 1024 MB.
(a)Calculate the size of the .mp3 file in MB.[1]
(b)Calculate how many whole .mp3 files of this size can be stored in 2 GB.[2]
(c)State one drawback of using .mp3 for this recording.[1]
(c) Some sound quality is lost permanently and cannot be recovered (lossy).
1 mark.
Q23Generic file formats · Challenge · Paper 3 style · 3 marks
(a)A student types CSS rules in a word processor and saves the file as house.rtf. He renames it house.css and attaches it to his web page, but none of the styles appear. Explain why.[2]
(b)Describe how he should create the stylesheet so that it works.[1]
Show answer
(a) The .rtf file contains formatting codes/control words as well as the CSS text; renaming does not remove them, so the browser cannot read the rules (invalid CSS).
1 mark for formatting codes in rtf, 1 mark for browser cannot interpret them.
(b) Type the rules in a text editor (or the web-authoring software) and save as plain text with the .css extension.
1 mark.
Q24Generic file formats · Challenge · Paper 1 style · 6 marks
(a)A school in Rawalpindi plans to email its 20-page prospectus to parents as a .pdf file instead of a word-processed file. Discuss the advantages and disadvantages of using .pdf.[6]
Show answer
(a) Advantages: parents can open it on any device with a free reader/web browser; layout, fonts and images look exactly as designed; parents cannot easily change the content; can be compressed to a smaller file for emailing; can include links/bookmarks; can be printed accurately. Disadvantages: hard for the school or parents to edit/update – a new PDF must be made from the original; large if it contains many high-quality images; text may be hard to read on small phone screens because it does not reflow; screen readers may not read it well if not tagged; fill-in sections need special software. Conclusion.
5–6: both sides developed and linked to the prospectus, with conclusion; 3–4: both sides with some development; 1–2: simple points.
Q25Generic file formats · Challenge · Paper 3 style · 4 marks
(a)A shop manager saves her sales spreadsheet in .csv format so that it can be imported into an accounts system. Describe three things that will be lost when the spreadsheet is saved as .csv.[3]
(b)Explain why .csv is still a good choice for transferring the data.[1]
Show answer
(a) Any three, e.g. formulas – only the calculated values are saved; cell formatting such as fonts, colours, borders, currency symbols; charts and images; additional worksheets – only the active sheet is saved; column widths/merged cells; named ranges/conditional formatting.
1 mark each.
(b) It is plain text that almost any spreadsheet/database/accounts software can import, whatever software created it.
1 mark.
Q26Generic file formats · Challenge · Paper 1 style · 4 marks
A school photographer has a photo of a science fair stored as a 2.88 MB file. After saving it as a .jpg the file is 0.36 MB.
(a)Calculate the percentage reduction in file size.[2]
(b)Explain why the photographer should keep a copy of the original file as well as the .jpg.[2]
(b) JPG compression is lossy, so detail removed cannot be recovered; the original is needed for high-quality printing/later editing, and re-saving a JPG reduces quality further.
1 mark each.
Q27Generic file formats · Challenge · Paper 1 style · 4 marks
Imran wants to email 25 holiday photos from Swat to his cousin in Toronto. The photos are .jpg files with a total size of 180 MB. His email service allows attachments of up to 25 MB per email.
(a)Calculate the smallest number of emails needed if the photos are sent without changing them.[1]
(b)Imran zips the photos but the zip file is still about 175 MB. Explain why.[1]
(c)Describe two other ways Imran could send the photos.[2]
Show answer
(a) 8 emails
180 ÷ 25 = 7.2, so round up to 8 emails.
(b) JPG files are already compressed (lossy), so lossless zip compression can make them only slightly smaller.
1 mark.
(c) Reduce the resolution/quality of the photos (lossy) so they fit in fewer emails; upload them to cloud storage and email a link with shared access; use a file-transfer service.
1 mark each.
Q28Generic file formats · Challenge · Paper 1 style · 4 marks
(a)A video-streaming service stores films as compressed .mp4 files. Describe how lossy compression reduces the size of a video file.[3]
(b)Explain one reason why the service uses lossy rather than lossless compression.[1]
Show answer
(a) Removes detail that viewers are unlikely to notice (e.g. small colour differences); stores only the parts of each frame that change from the previous frame instead of every whole frame; reduces the resolution/frame rate/bit rate; removes inaudible sounds from the soundtrack.
1 mark per point, max 3.
(b) Lossy compression gives much smaller files, so films stream without buffering and use less data/storage; the small loss of quality is hardly noticed.
1 mark.
Q29Generic file formats · Challenge · Paper 1 style · 6 marks
(a)A photographer in Hunza is sending landscape photos to a magazine that will print them on large pages. Discuss whether she should send the photos as highly compressed .jpg files or in a lossless format such as .png.[6]
Show answer
(a) JPG (high compression): much smaller files, quick to upload over a slow mountain internet connection, fit email limits, use less storage; but lossy – fine detail and colour gradients (sky) may show blocks/artefacts when printed large, and quality cannot be recovered. Lossless (.png): keeps every pixel, best quality for large printing and further editing by the magazine; but files are much larger, slow to upload, may need cloud storage/file transfer. Middle way: JPG at high quality/low compression, or send small previews first then full files of chosen photos. Conclusion, e.g. lossless/high-quality files because print quality is the priority.
5–6: both formats discussed in context with justified conclusion; 3–4: both sides with some development; 1–2: simple points.
Q30Generic file formats · Challenge · Paper 3 style · 4 marks
(a)A web page must show the video clip tour.mp4 with controls that the user can use to play and pause it. If the browser cannot play the video, the text 'Video not supported' must be shown. Write the HTML to do this.[3]
(b)Explain why .mp4 is a suitable format for video on a web page.[1]
Show answer
(a)<video controls> <source src="tour.mp4" type="video/mp4"> Video not supported</video>
1 mark for <video controls> … </video>; 1 mark for source with src="tour.mp4" (type="video/mp4"); 1 mark for fallback text placed inside the video element. Accept <video src="tour.mp4" controls>Video not supported</video>.
(b) It is supported by almost all browsers/devices and is compressed so it downloads/streams quickly.
1 mark.
Similar questions
Questions that test the same subtopic in different years, grouped so you can work on one skill at a time.
References only: find each question in its paper (official link where available, otherwise through your school).