With reference to the Source code, consider the following statements: ...
Statement 1: It is the set of instructions and statements written by a programmer using a computer programming language.
This statement is correct. Source code refers to the written instructions and statements that are created by a programmer using a specific computer programming language. It is a human-readable form of the program that is used to communicate with the computer and instruct it on what tasks to perform.
When a programmer writes source code, they use a programming language such as C, Java, Python, etc., to define the logic and behavior of the program. The source code contains a series of instructions and statements that are written in a specific syntax and structure, which can be understood by both the programmer and the computer.
Statement 2: Every programme written by the programmer has only a single source code.
This statement is incorrect. A program can be composed of multiple source code files. In complex software systems, it is common to divide the program into multiple modules or components, each of which may have its own source code file.
Dividing the program into multiple source code files helps in organizing the code, improving modularity, and allowing multiple programmers to work on different parts of the program simultaneously. These source code files are then compiled or interpreted together to generate the final executable program.
Furthermore, a program can also make use of external libraries or modules that are developed separately and provided as pre-compiled code. In such cases, the programmer does not have access to the source code of these external libraries but can still use them in their program.
Therefore, it is important to note that a single program can have multiple source code files, whether they are developed by the programmer or obtained from external sources.
In conclusion, statement 1 is correct as source code is indeed the set of instructions and statements written by a programmer. However, statement 2 is incorrect as a program can have multiple source code files.
With reference to the Source code, consider the following statements: ...
Recently, twitter opened a portion of its source code to the public, including the algorithm to recommend tweets in users’ timelines.
- Open source is a term that originally referred to open source software (OSS).
- Open source software is code that is designed to be publicly accessible—anyone can see, modify, and distribute the code as they see fit.
- Open-source software is developed in a decentralized and collaborative way, relying on peer review and community production.
- Source code is the set of instructions and statements written by a programmer using a computer programming language.
- This code is later translated into machine language by a compiler. The translated code is referred to as object code.
- Source code is the source of a computer program.
- It contains declarations, instructions, functions, loops and other statements, which act as instructions for the program on how to function.
- Programs may contain one or more source code text files, which can be stored on a computer’s hard disk, in a database, or printed in books of code snippets.
Hence only statement 1 is correct.
To make sure you are not studying endlessly, EduRev has designed UPSC study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in UPSC.