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)
27 views
CS Fall 2022
Past Papers
Uploaded by
laibaakbar015
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 now
Download
Save CS Fall 2022 For Later
Download
Save
Save CS Fall 2022 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
27 views
CS Fall 2022
Past Papers
Uploaded by
laibaakbar015
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 now
Download
Save CS Fall 2022 For Later
Carousel Previous
Carousel Next
Save
Save CS Fall 2022 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 3
Search
Fullscreen
UNIVERSITY OF THE ‘gS. ln Computer Science Second Some UNUAB tor ~ Spring 2022 Programming Fundamantats Paper Coat s WERE IE ATTEMP” IE ANSWi Q4, Write short note on the following: ‘ Conuider tha tollowing code, What wil be the Plt to the console when the \Reration f for loop rune? © Include «vtdle.hy © kaclode «ateing.hy- oid dtsplay(int vy (6x5=30) vecond vn mating) hat vers; atiatvce & von) Hsplay(vy Print t ("xe w--) prinet(sjp return ¢; ) 3% Wow martes tr boop athe toowing program wil exsexte? eh 3 Suppose you have an aray:int s20{4I2} « (22.,11,2 }, What wil be the eutput (Of printfa" arr2D [1]; 4 Wehat will be the evtput of the following program? # include estdio,h> # Include
Ant maln() File “Files char cf400)i (ile wtopeetetiiele yw), elds Ertugral ix a turkish historical fiction”); felove(file); file = fopen("file. ‘freek(File, 3, StEK_SET); frcant( File, printh(“Ra",c)y, return 0; Page 1013 PTO. (59 CamScannet* panto he ott of the fll Porat 5 eatdia.o ‘oa or tent) Uae aaa eden asnzitelt ink Sh ae are retarn 05 . ’ - 9 [ «cont teflon ce Hiern ts qeseute? ide the while foo Mt # dnclode cstdio.hs w include catring-}> i maint) Sat ast, bay ietilefanie) peintf("w\n") if(o—b) bebo ie anh{b-a)al return 8) ) f ws Q.2, Answer the following questions. Part a ‘Welte C program that raives the Sti problem Consider the fllowing alprtha to generale wvequnnee Of umber. Start with an integer n. If ts even, divida by 2, ifm is odd, multiply by 3 and add |, Repeat this ‘Process with themew value of, terminsting whea 2 1. For example, the following feqoence of mumbers wil bo generated for n = 22: 22114 1752 26 134020105 16842.) Foran input, the cysis-leagth of n is the number of rumbers generated up to anc (naluding the 1. In tho example above, the cycle length of 22 is 16. Given any two mutes (und), you are to determine the muximum eyclo agth aver all numbers ‘even an aig oth epi, Tee pet wll const oF series of paca tego ahj-cat fof nteges Hi. integer wil beat than 1,000,000 and greta tn 0. ™ ‘Foren pa oflapit lateper ian, outta det rotor pet tacze oer fn which Dey nia Thr tom te hl eee one i i Ot ‘oes low mad with one lin af antpat for enc line of gph.Feassple Input 110 100 200 201210 900 1000 | Sample Output 11020 100 200 125 20121089 900 1000 174 Part B For each of the following, write C statements that perforan the speciffed ALDeciere a built-in array of type int called valves with five elements, and ‘the even imogers trom 2 to 10, Assume thatthe constant SIZE has bees Bae Pointer vPtr that points to-an object af type tnalgned int. Ses ‘Stterentto display the elements of bul-in tray values using array subscript AL Write to separmt statements thet antiga tho stuting sddress of builtin array values ‘to pointer variable vPtr, ££) Uses for statement to display the clements of bult-ingrray values using pointce/ottiet £1 Usea for statement to display the elements of buill-is brray values using pointee/affoet ‘notation with the built-in errey's mame us the pointer, 8) Use 1 for statement to display the elements of ‘valuze by subscsipting the pointer “he built-in array, eee _ ° ‘task, initialize the elements to defined as 5, Partc Write a © program that prints the following pattern on the screen, You rust use nested loops otherwise ZERO will be awarded, 1 6 16 31 51 76 egeueer Beene RRERER* geapes gaeeRe , —+ page 30f 3 B camscamer
You might also like
Vrec Pps Lab Manual
PDF
No ratings yet
Vrec Pps Lab Manual
69 pages
C Progms List
PDF
No ratings yet
C Progms List
32 pages
Pps Labmanual
PDF
No ratings yet
Pps Labmanual
75 pages
Bceq I I PDF
PDF
No ratings yet
Bceq I I PDF
171 pages
Engineering Questions
PDF
No ratings yet
Engineering Questions
162 pages
C-LAB-MANUAL
PDF
No ratings yet
C-LAB-MANUAL
72 pages
Lab Manual
PDF
No ratings yet
Lab Manual
32 pages
Pps Lab Manual
PDF
No ratings yet
Pps Lab Manual
58 pages
EE110: Programming For Engineers - 1: Sections A, B, C (Fall 2011)
PDF
No ratings yet
EE110: Programming For Engineers - 1: Sections A, B, C (Fall 2011)
6 pages
PDF 3
PDF
No ratings yet
PDF 3
4 pages
C Language Notes-2
PDF
No ratings yet
C Language Notes-2
40 pages
List of C Program Scenarios
PDF
No ratings yet
List of C Program Scenarios
5 pages
Equiv Ta Decimal Number To Binary Number
PDF
No ratings yet
Equiv Ta Decimal Number To Binary Number
14 pages
6phrase - 2019 - TCS - Coding Section
PDF
No ratings yet
6phrase - 2019 - TCS - Coding Section
13 pages
105360 10 19UCSES301 B 3 12Unit 1 Solved Application Qns
PDF
No ratings yet
105360 10 19UCSES301 B 3 12Unit 1 Solved Application Qns
12 pages
I-I CPE SubjectLab Syllabus
PDF
No ratings yet
I-I CPE SubjectLab Syllabus
4 pages
Adobe Scan 16 Sep 2023
PDF
No ratings yet
Adobe Scan 16 Sep 2023
30 pages
#Questions: 10 #Pages: 3 Set: A
PDF
No ratings yet
#Questions: 10 #Pages: 3 Set: A
13 pages
C PROGRAMING PRACTICALS LIST - Final
PDF
No ratings yet
C PROGRAMING PRACTICALS LIST - Final
4 pages
Pps Cse
PDF
No ratings yet
Pps Cse
93 pages
Coding Interview Questions In C Commonly asked _ PrepInsta
PDF
No ratings yet
Coding Interview Questions In C Commonly asked _ PrepInsta
16 pages
Experiment8
PDF
No ratings yet
Experiment8
11 pages
C Practical File
PDF
100% (1)
C Practical File
69 pages
C Assignments PDF
PDF
100% (2)
C Assignments PDF
9 pages
C Programming Beginners Questions
PDF
0% (1)
C Programming Beginners Questions
12 pages
Lab Evaluation 3 Question Sets PDF
PDF
No ratings yet
Lab Evaluation 3 Question Sets PDF
12 pages
Mid1-ITC-Fall-2015 - DONE
PDF
No ratings yet
Mid1-ITC-Fall-2015 - DONE
11 pages
102000110 (1)
PDF
No ratings yet
102000110 (1)
5 pages
PPS Programs Quetsion Bank
PDF
No ratings yet
PPS Programs Quetsion Bank
39 pages
MIT Civil Engineering Notes 1st Year
PDF
No ratings yet
MIT Civil Engineering Notes 1st Year
5 pages
BOP Paper 2019
PDF
No ratings yet
BOP Paper 2019
6 pages
CP File
PDF
No ratings yet
CP File
87 pages
Sheet4 060701
PDF
No ratings yet
Sheet4 060701
12 pages
C-Programming-Sample Programs
PDF
No ratings yet
C-Programming-Sample Programs
101 pages
Cp end sem 2024
PDF
No ratings yet
Cp end sem 2024
4 pages
Lab Exam Makeup
PDF
No ratings yet
Lab Exam Makeup
4 pages
I Sem Lab Manul C Programming 23-24
PDF
No ratings yet
I Sem Lab Manul C Programming 23-24
41 pages
Program Solution Notes
PDF
No ratings yet
Program Solution Notes
11 pages
C-past-questions
PDF
No ratings yet
C-past-questions
14 pages
PPS LAB
PDF
No ratings yet
PPS LAB
2 pages
C Programming LAB Syllabus Programs 1 42 (1)
PDF
No ratings yet
C Programming LAB Syllabus Programs 1 42 (1)
65 pages
PPS Lab Manual
PDF
No ratings yet
PPS Lab Manual
62 pages
BSCS CC-112 PF 2022 Solved
PDF
No ratings yet
BSCS CC-112 PF 2022 Solved
8 pages
Coding Assignment: CSE 1110: Introduction To Computer Systems Basic Problems
PDF
No ratings yet
Coding Assignment: CSE 1110: Introduction To Computer Systems Basic Problems
10 pages
C Ipe Practicals Solution
PDF
No ratings yet
C Ipe Practicals Solution
38 pages
Previous Year Question Papers
PDF
No ratings yet
Previous Year Question Papers
12 pages
Code
PDF
No ratings yet
Code
9 pages
Practice 03 C Programming Constructs
PDF
No ratings yet
Practice 03 C Programming Constructs
20 pages
PPS Lab Manual
PDF
No ratings yet
PPS Lab Manual
72 pages
s2 C Programming KTU 2019 Syllabus
PDF
No ratings yet
s2 C Programming KTU 2019 Syllabus
9 pages
Pps External Lab Important Questions
PDF
No ratings yet
Pps External Lab Important Questions
4 pages
Practice 03 Solutions
PDF
No ratings yet
Practice 03 Solutions
21 pages
C Previous Year Qps
PDF
No ratings yet
C Previous Year Qps
34 pages
CDSmanual New 10-11
PDF
No ratings yet
CDSmanual New 10-11
36 pages
Pds Lab Practice Questions
PDF
No ratings yet
Pds Lab Practice Questions
10 pages
PPSL MANUAL student copy (1)
PDF
No ratings yet
PPSL MANUAL student copy (1)
140 pages
PPS LAB MANUAL II SEM
PDF
No ratings yet
PPS LAB MANUAL II SEM
46 pages
C Programming Past Updated - 2080
PDF
No ratings yet
C Programming Past Updated - 2080
32 pages
Professional practice important Qs
PDF
No ratings yet
Professional practice important Qs
21 pages
keybooktoprogrammingexercisesofoopcfreebooks-200313041951l
PDF
No ratings yet
keybooktoprogrammingexercisesofoopcfreebooks-200313041951l
137 pages
Professional Ethics & Code of Ethics
PDF
No ratings yet
Professional Ethics & Code of Ethics
19 pages
MATH251
PDF
No ratings yet
MATH251
3 pages