IMPORTANT QUESTION OF PROGRAMMING PRINCIPLES & ALGORITHM - BCA 1ST SEMSTER CCSU
Important Questions for exam | BCA 1st semester #ccsu #bca
1. Explain the history of C language ?
Introduction of C
- C is a general-purpose, high-level language that was originally developed by Dennis M.Ritchie and Ken Thompson
- C was originally developed for UNIX operating system to beat the issues of previous languages such as B, BCPL, etc.
- The UNIX operating system development started in the year 1969, and its code was rewritten in C in the year 1972.
- In 1991, Linux kernel development started, and it’s additionally written in C.
- In 1977, Oracle database development started, and in 1983 its code was rewritten from assembly to C. It became one in all the foremost widespread databases within the world.
- Now a days C is exclusively used for building OS, application packages and customized software. Because of its power and efficiency, it has gained more popularity.
- C is increasingly used by system programmers, application developers and researchers for a spread of programming tasks.
- Today, the UNIX operating system, the C compiler, and essentially all UNIX applications programs have been written in C.
- It is a structured programming language that is machine-independent and extensively used to write various applications, Operating Systems like Windows, and many other complex programs like Oracle database, Git, Python interpreter, and more.
- It is said that ‘C’ is a god’s programming language. One can say, C is a base for the programming. If you know ‘C,’ you can easily grasp the knowledge of the other programming languages that uses the concept of ‘C’
- It is essential to have a background in computer memory mechanisms because it is an important aspect when dealing with the C programming language.
Summary
- ‘C’ was developed by Dennis Ritchie in 1972.
- It is a robust language.
- It is a low programming level language close to machine language
- It is widely used in the software development field.
- It is a procedure and structure oriented language.
- It has the full support of various operating systems and hardware platforms.
- Many compilers are available for executing programs written in ‘C’.
- A compiler compiles the source file and generates an object file.
- A linker links all the object files together and creates one executable file.
- It is highly portable.
2. What do you understand by identifiers ?
- In simple terms, scope of a variable is its lifetime in the program. This means that the scope of a variable is the block of code in the entire program where the variable is declared, used, and can be modified. In the next section, you'll learn about local scope of variables In this section, you'll learn how local variables work in C.
C language is task /function oriented language. In this language we are focusing how to do the task and not focusing on data security,code reusability etc.
That's why is procedure oriented language.
A removable storage drive is used for storing and transporting data from one computer to another. It will allow you to read (open), write (make changes and save), copy, add, and delete files. It connects to a computer through a USB port.
An algorithm is a finite sequence of well-defined, machine-implementable instructions in computer science, usually for solving a class of problems or conducting a computation. Algorithms are always unambiguous and are used for performing calculations, processing data, automated reasoning, and other tasks as specifications.
An algorithm can also be defined as “a set of rules that precisely defines a sequence of operations" that would cover all computer programs (including programs that do not perform numeric calculations).
An algorithm is a finite sequence of well-defined, machine-implementable instructions in computer science, usually for solving a class of problems or conducting a computation.
Explanation -
- Let us name the algorithm as minimum_of_two_numbers.
- It takes the two numbers as the input. Let us name the inputs as x and y. x, y should be real numbers.
- It produces a minimum of two numbers x, y as the output. Let us name the output as result. Then, the result should be a minimum of x, y.
Now the algorithm's specification is:
- – – minimum_of_two_numbers (x,y)
- – – inputs: x, y are real numbers.
- – – output: result: = minimum_of_two_numbers (x,y)
The algorithm's specification is:
- – – minimum_of_two_numbers (x,y)
- – – inputs: x, y are real numbers.
- – – output: result: = minimum_of_two_numbers (x,y)
10. Define time complexity.
The time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Thus, the amount of time taken and the number of elementary operations performed by the algorithm are taken to differ by at most a constant factor.
Programming Principles & Algorithm Important Questions for exam | BCA 1st semester #ccsu #bca
PART 1