0% found this document useful (0 votes)
8 views

Assignment 1

The document outlines a series of assignments related to C programming and Linux, divided into three modules. It includes tasks such as writing pseudocode, comparing flowcharts and pseudocode, understanding Linux file systems, and performing binary and hexadecimal conversions. Additionally, it covers C programming concepts like comments, input/output differences, and basic arithmetic operations.

Uploaded by

kuna.padmaja
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Assignment 1

The document outlines a series of assignments related to C programming and Linux, divided into three modules. It includes tasks such as writing pseudocode, comparing flowcharts and pseudocode, understanding Linux file systems, and performing binary and hexadecimal conversions. Additionally, it covers C programming concepts like comments, input/output differences, and basic arithmetic operations.

Uploaded by

kuna.padmaja
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

C Programming with Linux – I(Assignment 1)

MODULE-1

Sl.NO QUESTION RBT

1 Write a pseudocode for a program to find if the input integer is even or odd and L1
describe its flow using a flowchart.
2 Compare the advantages of using flowcharts versus pseudocode in program L2
design.
3 Enumerate the hierarchical structure of the Linux file system and explain the L1
purpose of key directories like /bin, /home, /var, /proc, /tmp and /sbin
4 Interpret the differences between absolute and relative paths with examples for L2
navigating a Linux directory structure.
5 Use cd, mkdir, and touch commands to set up the following structure: L3

6 Below is the sequence of commands using cd, mkdir, and touch. Build the tree L3
structure for the same.

cd /home/cse_user
mkdir project
cd project
mkdir dir1
mkdir dir2
mkdir dir3
cd dir1
touch file1
touch file2
cd ..
cd dir2
touch file3
cd..
cd dir3
touch file4
7 Consider a file secret.txt with the permissions rw-r--r--: L3
 The owner should be able to read and write the file.
 The group and others should have no permissions on the file.
Explain how to change the file permissions by applying both symbolic and octal
notation.
8 Define the key stages of the C program compilation process and summarize their L1
functions briefly.
9 Write a simple C program to print "Hello, World!" and describe the purpose of L1
each line in the code.

MODULE-2

Sl.NO QUESTION RBT


1 a) Convert the decimal number 175 into its hexadecimal representation. L1

b) What is the hexadecimal representation of the binary number 11011011.


2 a) Convert the hexadecimal number A3 into binary. L1

b) Write the 12-bit binary representation of the hexadecimal number 2F9.


3 a) Convert the 8-bit one’s complement representation 11101110 into its two’s L1
complement equivalent.

b) Convert the signed magnitude binary 10011001 into its decimal equivalent.
4 a) Convert the binary fractional number 0.101 into its decimal equivalent. L1

b) What is the decimal value of the binary fractional number 0.1101.


5 a) Convert the fractional decimal number 0.75 to its binary equivalent. L1

b) Write the binary representation for the fractional decimal number 0.3125.
6 Represent the decimal number 9.75 in IEEE 754 single-precision format. L3
(Represent both in binary and hexadecimal format)

MODULE-3

1 a) What is the purpose of comments in a program? L1

b) Write an example of both a single-line and a multi-line comment in C.


2 What is the difference between formatted and unformatted input/output in C. L1
3 List the rules for naming identifiers in C. L1
4 a) What is the purpose of the assignment operator = in C? L1
b) Write a C statement to assign the value 25 to a variable named age.

c)List the logical operators in C and explain their meaning.


d) Given the values x = 10 and y = 20, evaluate the following relational
expressions and state whether they are true or false: (i) x > y (ii) x <= y (iii) x ==
y
5 Write a program to calculate the sum, difference, product, and quotient of two L2
integers a and b.

You might also like