IMPORTANT QUESTION OF PROGRAMMING PRINCIPLES & ALGORITHM - BCA 1ST SEMSTER | Programming Principles & Algorithm Important Questions for exam | BCA 1st semester #ccsu #bca

 IMPORTANT QUESTION OF PROGRAMMING PRINCIPLES & ALGORITHM - BCA 1ST SEMSTER CCSU 

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.

Dennis M. Ritchie


  • 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.



History of C 




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 ?

An identifier is a string of alphanumeric characters that begins with an alphabetic character or an underscore character that are used to represent various programming elements such as variables, functions, arrays, structures, unions and so on. Actually, an identifier is a user-defined word.


3. Explain the concept of scope of  variables.

  • 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.

4. Why C language is known as procedural language ?

  • Procedural language is also known as imperative language. Why is C referred to as a procedural language? Because C programs follow a procedure of steps written in it, called functions.

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.


5. What is data types ? 

Some common data types include integers, floating point numbers, characters, strings, and arrays. They may also be more specific types, such as dates, timestamps, boolean values, and varchar (variable character) formats. ... Most programming languages allow each variable to store a single data type.

6. What is flowcharts ? Explain with the suitable example and symbols.

A flowchart is a diagram that shows how a workflow or procedure works. A flowchart is a diagrammatic representation of an algorithm or a step-by-step procedure for completing a process. The flowchart depicts the steps as different types of boxes, with arrows linking the boxes to indicate their sequence. Standard signs are typically used in flowcharts to describe various types of instructions. These symbols are being used to create the flowchart and display the problem's solution in steps.







7. What do you understand by functions ? Explain with its types.

Functions : Function are a block of statements that perform a specific task. These statements take inputs, do some specific computation and then produces output. They process information which is passed to them from the calling portion of the program and return a single value.

These are two types of functions :- 

a) Standard Functions : The functions that perform most of the commonly used operations or calculations are standard functions. C language comprises of a library of standard functions. The functions that are inbuilt in the language complier  are library functions.
ex. - printf() and scanf() .

b) User-defined functions : These are the user modules that are deliberately created for a specific purpose. This creation of modules results in  function. A user-defined function has to be developed by the user at the time writing a program. It can later become a part of the C program library.

8. What do you understand by storage class ? Explain.

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.










9. What is algorithm ? Explain.


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 -


  1. Let us name the algorithm as minimum_of_two_numbers.
  2. It takes the two numbers as the input. Let us name the inputs as x and y. x, y should be real numbers.
  3. 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:

  1. – – minimum_of_two_numbers (x,y)
  2. – – inputs: x, y are real numbers.
  3. – – output: result: = minimum_of_two_numbers (x,y)

The algorithm's specification is:

  1. – – minimum_of_two_numbers (x,y)
  2. – – inputs: x, y are real numbers.
  3. – – 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













Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.