0% found this document useful (0 votes)
15 views2 pages

B.Tech CSE Programming Assignment

This document is an assignment for first-year B. Tech students in the Computer Science & Engineering department, covering various topics in programming for problem solving. It includes questions on C programming, memory types, algorithms, and operating systems, along with requests for explanations and examples. The assignment is structured into two sections, with Section A focusing on theoretical questions and Section B on practical applications and explanations.

Uploaded by

ferak53573
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

B.Tech CSE Programming Assignment

This document is an assignment for first-year B. Tech students in the Computer Science & Engineering department, covering various topics in programming for problem solving. It includes questions on C programming, memory types, algorithms, and operating systems, along with requests for explanations and examples. The assignment is structured into two sections, with Section A focusing on theoretical questions and Section B on practical applications and explanations.

Uploaded by

ferak53573
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNITED GROUP OF INSTITUTION

B. TECH. – First Year Assignment,


Session: 2022-23
(Department of Computer Science & Engineering)
SUBJECT: PROGRAMMING FOR PROBLEM SOLVING (BCS101 / BCS201)

Module – 1
Section - A

1. What is difference between .obj and .exe file in C?(2016-2017,2018-2019)


2. List the components of C language.(2018-2019)
3. Write the structure of 'C' program. (2016-2017,2019-2020)
4. Difference between RAM and ROM.(2016-17, 2018-2019)
5. What is token in C Language?(2016-2017)
6. What are the escape sequences characters?(2015-2016)
7. Why C programming is called structured programming?(2015-2016)
8. Write the fundamental data type in C Programming and its range.(2020-2021)
9. What is the difference between pseudo code and flow chart?(2016-2017)
10. Distinguish between -int main () and void main ()(2016-2017)
11. What will be the output of following code? (2017-2018)
void main()
{
int a=5,b=6;
printf(“%d\t”,a=b);
printf(“%d\t”,a==b);
printf(“%d\t”,a,b);
}
12. Write short notes on high level and low-level languages.(2016-2017)
13. Define all Arithmetic Operator.(2020-2021)
14. Define preprocessor and it's usage.(2020-2021)
15. Why RAM is called volatile memory?(2021-2022)
16. Differentiate High Level and Low Level language.(2021-2022)
Section - B

1. Write an algorithm and draw a flow chart to find out the sum of digits of an integer number entered by
the user.( 2018-2019)
2. Draw the block diagram of a computer system. Explain its different components with suitable
example.(2018-2019, 2016-2017,2019-2020, 2017-2018, 2021-2022)

1
3. Discuss the concept of assembler. Explain compiler, interpreter, loader and linker with example.
( 2018-2019, 2016-2017, 2020-2021, 2019-2020,2017-2018, 2021-2022)
4. Discuss with the example the different storage classes available in 'C'. ( 2020-2021, 2019-2020, 2016-
2017, 2015-2016, 2017-2018)
5. Explain the memory hierarchy of a computer system. ( 2016-2017, 2018-2019, 2016-2017, 2021-2022)
6. What is an algorithm? Give the characteristics of an algorithm. ( 2016-2017, 2021-2022)
7. Write an algorithm for printing table of a given positive integer also draw the flow chart for the
same.(2016-2017)
8. What is an operating system? Discuss its various functions. Also Compare between Linux and Windows
OS. (2016-17, 2015-2016,2019-2020, 2018-2019, 2017-2018)
9. Define data types in C. Discuss primitive data types in terms of memory occupied, format specifier and
range. (2019-2020, 2018-2019,2017-2018, 2016-2017)
Brief the generation of programming languages with example. (2020-2021)

Common questions

Powered by AI

An operating system's core functions include managing hardware resources, offering a user interface, executing applications, and ensuring security and file system management. Linux is known for its open-source environment, strong security features, and customizability, often favored for servers and programming tasks. Windows OS, with its user-friendly interface and broad application support, dominates personal computing markets. Each OS excels in different priorities: Linux in flexibility and efficiency, Windows in user experience and market integration .

RAM, or Random Access Memory, is volatile memory used for temporary data storage while a computer is operational, allowing for fast read and write access. ROM, or Read-Only Memory, is non-volatile, retaining data even when the power is off, and typically used to store firmware or system-level functions. RAM's speed and volatility make it ideal for active processing tasks, whereas ROM's permanence is suited for essential system instructions .

The preprocessor in C handles directives—statements that begin with the '#' symbol, such as #include and #define—before compilation. It modifies the program's source code by including files and defining macros, making code management and modularization easier. For instance, #include inserts the content of a header file, and #define creates symbolic constants. These capabilities enhance the efficiency and organization of C programs .

The memory hierarchy, comprising registers, cache, RAM, and disk storage, impacts performance by balancing speed and capacity. Registers provide the fastest access since they're directly within the CPU, supporting rapid instruction execution. Caches act as intermediary storage, reducing latency by storing frequently accessed data. RAM offers substantial but slower temporary storage, while disk storage provides vast, non-volatile capacity at even slower speeds. This hierarchy efficiently manages data flow, minimizing bottlenecks and maximizing processing speed .

A flow chart visually represents an algorithm's steps and decision points, facilitating a clearer understanding of the program's control flow. In problem-solving, it helps programmers anticipate potential issues and logically organize their thoughts by outlining the process before coding. This foresight can identify errors or inefficiencies, improving the algorithm's overall design and functionality .

'int main()' and 'void main()' differ primarily in their return types, where 'int main()' returns an integer value to the operating system, indicating the success or failure of the program. This return type adheres to the C standard, facilitating error checking by external processes. 'void main()', though non-standard, does not return a value; hence, it lacks this feedback mechanism, which can affect robustness and debugging practices .

An algorithm's characteristics, such as clarity, simplicity, and definiteness, are crucial for ensuring that it effectively performs tasks by specifying each step clearly and unambiguously. Additionally, an algorithm should be efficient, balancing time and space complexity to handle tasks within acceptable resource limits. Characteristics like scalability and robustness ensure that an algorithm can handle larger data sets and adapt to diverse conditions without failing .

C is considered a structured programming language because it emphasizes dividing programs into functions or blocks, which promotes clarity and modularity. This structure allows for easier maintenance, understanding, and debugging, as programmers can focus on single routines or functions independently. This contrasts with unstructured programming, where code may become entangled and difficult to manage .

The core components of C programming include variables, data types, operators, control statements, functions, and pointers. Variables store data, which is defined by data types such as int, char, float, determining the kind of data they can hold. Operators perform operations on data. Control statements like loops and conditionals guide the flow of execution. Functions modularize code, and pointers allow for memory management and direct data manipulation. Together, they provide the basic framework for creating functional and efficient programs .

.obj files are object files created by the compiler, containing machine code but not yet executable because they lack the linkage of library files and system calls. .exe files, on the other hand, are executable files generated after linking, containing all necessary code to run a program independently. The .obj files serve as intermediate files in the compilation process, which ultimately produces the .exe file, ready for program execution .

You might also like