Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
72 views
4 pages
21CSS101J 12.12.2023 FN
Programming for Problem Solving QP
Uploaded by
Kavitha Rajendiran
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save 21CSS101J 12.12.2023 FN (1) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
72 views
4 pages
21CSS101J 12.12.2023 FN
Programming for Problem Solving QP
Uploaded by
Kavitha Rajendiran
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save 21CSS101J 12.12.2023 FN (1) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save 21CSS101J 12.12.2023 FN (1) For Later
You are on page 1
/ 4
Search
Fullscreen
Reg. No | B.Tech/M.Tech(Integrated) DEGREE EXAMINATION, DECEMBER 2023 First Semester 21CSS101J - PROGRAMMING FOR PROBLEM SOLVING (For the candidates admitted during the academic year 2022-2023 onwards) Part - A should be answered in OMR sheet within first 40 minutes and OMR sheet should be handed over to hall invigilator at the end of 40" minute. ii, Part - Band Part - C should be answered in answer booklet. Time: 3 Hours Max. Marks: 73 PART - A 20 x 1 = 20 Marks) Maris BL CO ‘Answer all Questions 1, The special character __can be used to declare a variable in C programming. road (A) anything (B) nothing (C) underscore (D) hyphen 2. which of the following is the default storage class for local variables in C 1 1 1 programming language? (A) auto (B) register (© static (D)extem 3. int a=33; int b=6; int x=a/b; printf(“%d"x); 1201 ‘What is the output of the above code snippet: as (B)55 jo @) 0.5 4, Write the output of the following C code snippet: 1201 int sl = -10; int Q= (sl++, +481): printi("%d\n", Q); (A) -8 il Ov @)2 5, Rewrite the following code to use the conditional operator rather than using an if 1 = 22 else. if (age>=18) then print eligible to vote. Otherwise print not eligible to vote. (A) (age>=18)? : printf( "eligible for (B) (age>=18) (printf("eligible for voting") , printf("not eligible for voting")) ? (print{("not eligible for voting! voting"); (©) (age>=18)? (printf(‘eligible for (D) (age>=18)? (printf(eligible for voting’)) ; (print{(‘not eligible for voting")) : (printf(*not eligible for voting’)): voting"); 6. Choose the correct answer for the following C code: 12 2 #include
‘void main() { for(int i=3; i<=6; i=i+2) { printi("i=%d".i); break; 3 I (A) 83555 (©) enor saper-21essi01s Page 1 of 410. th 12, 1B. 14, Page 2 of 4 Select the output for the following C program: #include
void main() for(int i=1; i<5; i=i+4) { printf("i=%d",i); @®) 1; @) error When you run the following code, how many times will the message "Weleome" appear on the screen? #include
void main() (int k=3; do printi(" Welcome\n" Ti: kek-l; goto Il; }while (k<=2); (A) onetime (B) two times (©) _ three times D) many times Which keyword is used to declare character array in C? (A) arr (B) string (Carr char ©) char ‘What will be the output of the following when collects the input as HAVE A GOOD. DAY? Hinclude
void main() char af5]; scanfi"%s" a); printf("%s",a); } (A) HAVE GOOD DAY - @®) HAVE (C) Nothing will be printed ©) error Ifthe two strings are identical, then stremp() function returns (A)-1 @)I jo @) yes Which is the correct option when collecting string variable s1 values as“ABCD” in the C programming language. (A) string s1 = “ABCD”; (B) char si[10]="ABCD”; (© char si="ABCD”; (©) string si{10}-"ABCD”; ‘Which one of the following is the correct extension of the Python file? (A) python ®) py (C) numpy Op ‘What will be the output of the following function in Python? round(4.576) (Aya ®)5 (C)4.5 (D) 4.6 1 2 2 2 2 13 23 13 13 14 14 s20#1-2165510151s. 16. 7. 18. 19. 20. 21. 22. 23. Page 3 of 4 Which of the following solution is correct when converting the given string, name="ABDUL KALAM'" to lower case in Python? (A) print(name.lower()) (B) print(name.toLower()) (© print(toLower(aame)) (©) print(ower(name)) Which one of the following is used to get the current time in Python? (A) import times ®)_ import print(time.asctime(time.localtime(time.time(JJ}jne; Print(localTime(time)) (C) import Time; (D) import time; Print(Time.asctime(localTime.time(time))) _print(localtime(time)) What is the output of the given Python code? x='10 y= 120" result = eval(x + y') print(result) (A) oxy ) 30 (© 1020 @) xy Select the appropriate output of the provided Python code. import numpy as np arr = np.zeros((1,2), dtype = int) print(arr) A) (12)) &) (01220 © ol @) [(00]) ‘What will be the output of the following Python code? import pandas as pd s =pa.Series({1,2,3,4,5],index= ['a',b';c''d'Je']) print(s['c'}) ) 5 @) ‘e" © 3 @) D To count the total number of elements in a dataframe in Python, we can use: (A) len @) count (© size (D) Values PART - B (4 « 10=40 Marks) Answer any 4 Questions ‘Venkat owns a boutique. He is dealing with an excel file that contains attributes such as the customerID, the Quantity purchased by the customer, the Amount of each item, and the Toial-price. In his C programme, he wishes to define the aforementioned attributes as variables with appropriate data types such as character- array, integer, float, and double and assign sample values to them using assignment statements. Find the size of the various data types of the specified variables and calculate Total-price. Assist him in writing a C programme for the mentioned purpose. Write a C program to calculate the following series using for loop. Sum = 1/37 + 2/43 + 3/5 + 4/6° + .... and print the result along with the series as the given format: when n=4; 1/37 + 2/43 + 3/54 + 4+6° = 0.14768 similarly, print the result according to the n® term. Write a C program for the following using user-cefined function with arguments: Collect four student's names such as "Dheetshitha", "Dharshika", "Iai" and "Dev" while declaring the variable "Names" using character array’ and assignment statement. Get any name fromi the user and then check whether the given name entered by the user is available in the specified character array. If't is available, then print the appropriate position of the given name otherwise print position as -1 102 4 102 4 1 2 3 1 205 1205 11s Marks BL CO wo 2 2 wm 3 2 wo 33 sabFt-21css101124. 26. 27. 28. Page 4 of 4 ‘Hema runs a fruit shop. She collects the customer-name with age and purchased fruit names, Help her to save the sample collected information using the following Python data types: i) list tuple ) dict iv) set vy) boolean Distinguish between PANDAS with NUMPY using different comparison parameters in Python programming language. Lakshmi writes a sentence in her notebook. She wants to count the number of uppercase characters, Jowercase characters, digits and special symbols in her sentence. Help her to find using a C program. PART - C (1 x 15 = 15 Marks) Answer any 1 Questions Two examinations were conducted for three groups of students namely Team 1, ‘Team 2, Team 3 and their data on average of marks for the subjects Tamil, English, Science and Mathematics are given below in the form of matrices X and Y. Find the total marks of both the examinations for all the three groups using C programming, language and print the results. Teami “2s um | Team ; 2 38 35 40: X= Team2’ 50 @ 2130 | Y= Team2 ) 18 2 7 w , | i Team3‘% ® 3 40 Team3 | e147 2 18 Raman has two boxes, both of which are coloured blue and green. The blue colour box only holds two chocolates, whereas the green box holds ten. He wants to use the quantity of chocolates in his boxes to do mathematical operations like addition, subtraction, and multiplication, Help him by implementing the following user- defined functions in a C program: i, void add(); i, _void subtract(int, int); iii, int multiply(int, int); wo 2 4 wo 2 5 wo 3 3 ‘Marks BL CO 302 3003 raprt-2tcss101)
You might also like
Pps Sem
PDF
No ratings yet
Pps Sem
4 pages
21CSS101J Jan 2023
PDF
No ratings yet
21CSS101J Jan 2023
4 pages
PDFGallery 20240922 163532
PDF
No ratings yet
PDFGallery 20240922 163532
4 pages
21CSS101 03-01-2024 FN
PDF
No ratings yet
21CSS101 03-01-2024 FN
4 pages
Programming For Problem Solving-Csen 1001-2023
PDF
No ratings yet
Programming For Problem Solving-Csen 1001-2023
4 pages
Programming For Problem Solving (Csen 1001)
PDF
No ratings yet
Programming For Problem Solving (Csen 1001)
5 pages
MLM Term 1
PDF
No ratings yet
MLM Term 1
23 pages
PF - Final Question Fall 2023
PDF
No ratings yet
PF - Final Question Fall 2023
6 pages
CT2 Set 2
PDF
No ratings yet
CT2 Set 2
4 pages
Xi Hy 2023 CS 18112023
PDF
No ratings yet
Xi Hy 2023 CS 18112023
6 pages
Set A
PDF
No ratings yet
Set A
4 pages
Csen 1001 - 2019 - May
PDF
No ratings yet
Csen 1001 - 2019 - May
2 pages
Binsys Technologies PVT - LTD
PDF
No ratings yet
Binsys Technologies PVT - LTD
18 pages
21CSS101J June 2023
PDF
No ratings yet
21CSS101J June 2023
4 pages
Oldpapers
PDF
No ratings yet
Oldpapers
158 pages
Computer Science (083) Class XII (2024-25) Time Allowed: 3 Hours Maximum Marks: 70 General Instructions
PDF
No ratings yet
Computer Science (083) Class XII (2024-25) Time Allowed: 3 Hours Maximum Marks: 70 General Instructions
13 pages
Programming For Problem Solving-Cse 1001-2024
PDF
No ratings yet
Programming For Problem Solving-Cse 1001-2024
4 pages
Sahodaya Kochi Model QP CS 2024
PDF
100% (1)
Sahodaya Kochi Model QP CS 2024
10 pages
CT2 Set 1
PDF
No ratings yet
CT2 Set 1
9 pages
ComputerScience SQP Set3 MS
PDF
No ratings yet
ComputerScience SQP Set3 MS
12 pages
Class 11 Bio CS 26122023
PDF
No ratings yet
Class 11 Bio CS 26122023
5 pages
PPS-I Sessional1 2024 25 Solution
PDF
No ratings yet
PPS-I Sessional1 2024 25 Solution
4 pages
Assignment Set01-CSE1101
PDF
No ratings yet
Assignment Set01-CSE1101
8 pages
XII CS Model Exam 1
PDF
100% (1)
XII CS Model Exam 1
9 pages
Cs Pyq 2022-23
PDF
No ratings yet
Cs Pyq 2022-23
12 pages
Previous Year Question Papers
PDF
No ratings yet
Previous Year Question Papers
12 pages
Choose The Correct Alternative For The Following
PDF
No ratings yet
Choose The Correct Alternative For The Following
2 pages
ComputerScience-SQP Set2
PDF
No ratings yet
ComputerScience-SQP Set2
7 pages
Comp Sample
PDF
No ratings yet
Comp Sample
13 pages
CS Mid Term Evening
PDF
No ratings yet
CS Mid Term Evening
8 pages
Class 12 QP-2
PDF
No ratings yet
Class 12 QP-2
4 pages
12 Cs Holiday HW
PDF
No ratings yet
12 Cs Holiday HW
7 pages
Sqp-Computer Science-Xi-Hy (2023-24)
PDF
No ratings yet
Sqp-Computer Science-Xi-Hy (2023-24)
5 pages
BCA2A Python
PDF
No ratings yet
BCA2A Python
8 pages
11th Half-Yearly Exam
PDF
No ratings yet
11th Half-Yearly Exam
7 pages
Quiz 13
PDF
No ratings yet
Quiz 13
2 pages
Comp. Sc. Sample Paper-4
PDF
No ratings yet
Comp. Sc. Sample Paper-4
7 pages
Sample Exam
PDF
No ratings yet
Sample Exam
16 pages
SQP Ms Term1 Xii
PDF
No ratings yet
SQP Ms Term1 Xii
6 pages
CT2 Set 3
PDF
No ratings yet
CT2 Set 3
5 pages
PSCP Minor 1 Sem1
PDF
No ratings yet
PSCP Minor 1 Sem1
8 pages
Jalpaiguri Reserch Paper
PDF
No ratings yet
Jalpaiguri Reserch Paper
2 pages
11 Ip
PDF
No ratings yet
11 Ip
11 pages
Cs 1
PDF
No ratings yet
Cs 1
8 pages
Puterscience SQP Set3
PDF
No ratings yet
Puterscience SQP Set3
7 pages
CS Xii PB QP - Set1
PDF
No ratings yet
CS Xii PB QP - Set1
13 pages
MCQ 1
PDF
No ratings yet
MCQ 1
28 pages
XII COMP Set A
PDF
No ratings yet
XII COMP Set A
2 pages
12 CS 2024-25 SQP 3
PDF
No ratings yet
12 CS 2024-25 SQP 3
7 pages
Set 21
PDF
No ratings yet
Set 21
13 pages
Assign CS
PDF
No ratings yet
Assign CS
9 pages
ComputerScience SQP Set2 MS
PDF
No ratings yet
ComputerScience SQP Set2 MS
12 pages
Mca 103
PDF
No ratings yet
Mca 103
7 pages
KPR Institute of Engineering and Technology: Q.No. PART - A (10 X 1 10 Marks) Answer All Questions M RBT CO
PDF
No ratings yet
KPR Institute of Engineering and Technology: Q.No. PART - A (10 X 1 10 Marks) Answer All Questions M RBT CO
2 pages
CLASS XI CS 24-25 Final
PDF
No ratings yet
CLASS XI CS 24-25 Final
5 pages
Ics104 Midterm v1 Key 211
PDF
No ratings yet
Ics104 Midterm v1 Key 211
17 pages
QP - Xi CS Hy083 2024-25 Set-1
PDF
No ratings yet
QP - Xi CS Hy083 2024-25 Set-1
6 pages
Computer Science XI SEE (2022-23) - MS
PDF
No ratings yet
Computer Science XI SEE (2022-23) - MS
8 pages