CS411 Final Term Past Paper Updated Mar 2022 by Rao Bilal
- Type
- Final term past paper
- Course
- CS411 Visual Programming
- Size
- PDF 813 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 32. Download the file for all 32 pages.
Q No 1. What is the code of “for loop” to add the n even number in JavaScript?
<script type="text/javascript"> function sum()
var n,i, sum = 0; n = parseInt(document.getMyProgram ("first").value); for (i = 1; i < = n; i++)
if(i%2 == 0)
sum = sum+i;
document.get< MyProgram ("num").innerHTML =" Sum of " +n+ " even natural numbers is :"+sum;
</script>
Q No 2. What are the five types of HTML? 5 marks
Five types of html in use:
- HTML 4.01 Transitional
- HTML 4.01 Strict
- XHTML 1.0 Transitional
- XHTML 1.0 Strict
- HTML5
Q No 3. How to define binary resource and what are the categories of binary resources in WPF? 3 marks Binary resources are what rest of .net framework considers a resource. To define a binary resource, add a file and set the build action resource or content (loose file). Binary resource has two categories Binary resource can be embedded to assembly Binary resource can be loose file that may or may not be known at compile time. It can be localizable or not.
Q No 4. Write the properties of touch point in C#. 3 marks
The properties of Touchpoint are Position, Size, Bounds, touchdevice, Action (Down, Up, Move).
Q No 5
What will be the output of the code.
It is a code for UI program that remains responsive with a cpu bound task. In the given codes we have used for loop. When the first call of getprimecounts is given then control will be returned and remaining code will go in continuation. We have called await from inside the for loop. Because i is also captured and is available in the continuation, so i will also be incremented in each iteration. We will move onward from await when getprimescountasync is finished and at that time we resume as just returned from await expression.
Q No 6 Create a single instance application using WPF. 5 marks
Single instance application means that it should be run only one time.
Bool mutexisnew; Using (System. Threading. Mutex m = New System. Threading. Mutex(true, uniquename, out mutexisnew))
If (mutexisnew) // This is the first instance. Run the application. Else // There is already an instance running. Exit!
Q No 7 Write the XAML code to create a list box with three items. 5 marks
<listbox xmlns=“ <listbox. Items> <listboxitem Content= “Item 1”/> <listboxitem Content= “Item 2”/> <listboxitem Content= “Item 3”/> </listbox. Items> </listbox>
Q No 8 What is the purpose of Block in Objective-C. 3 marks
Blocks are a language-level feature added to Objective-C, which allow you to create distinct segments of code that can be passed around to methods or functions as if they were values. Blocks are Objective-C objects, which means they can be added to collections like NSArray or NSDictionary.
Q No 9 Define the Data template using XAML? 3 marks
Data template is a bit of XAML that describes how bound data is displayed. A data template can contain elements that are each bound to a data property along with additional markup that describes layout, color and other appearance.
Q No 10 Differentiate between Get and Post Method. 3 marks
In GET method, values are visible in the URL. In POST method, values are not visible in the URL. GET has a limitation on the length of the values, generally 255 characters. POST has no limitation on the length of the values since they are submitted via the body of HTTP. GET results can be bookmarked. POST results cannot be bookmarked. GET Parameters remain in web. In Post Parameters are not saved in web. Get method supports only string data types. Post This method supports different data types, such as string, numeric, binary, etc.
Q No 11 Define iOS language feature block also write its syntax. 3 marks
Block is a chunk of code that can be executed at some future time. Blocks are first-class functions, which is a fancy way of saying that Blocks are regular Objective-C objects. Since they're objects, they can be passed as parameters, returned from methods and functions, and assigned to variables. The syntax to define a block literal uses the caret symbol ( ^ ), like this:
^{ NSLog( "This is a block"); }
Q No 12. Write the difference between onetime binding and onewayTo Source binding. Also give example of both in XAML. In one time binding, control value is updated only when the application is initialized. This means you cannot change the value from source to control; as for changing the value, you have to write code in code behind file, so that you can change value from the back-end programming. In One way to source binding, target control updates the source control, which means if you change the value of the target control, it will update the value of the source control. It is just the opposite to One way binding.
one time binding Example
txtvalue. Text = "50"; mySlider. Value = Convert. ToInt32(txtvalue. Text);
One way to source binding Example
< TextBox Name="txtvalue" Text="{Binding ElementName=myCS411, Path=Value, Mode=One WayToSource, UpdateSourceTrigger=PropertyChanged}"> </TextBox>
Q No 13 Give the structure of protocols in Objective-C.
Related CS411 files
All CS411 files →- CS411 Final Term Quizzes 13 July 2023 by Sana Sheikh Final term PDF 577 KB
- CS411 Final Term Quizzes 18 July 2023 by Sana Sheikh Final term PDF 556 KB
- CS411 Final Term Current Paper 2020 by VUBuddy Final term PDF 354 KB
- CS411 Final Term Past Papers 2018 Final term PDF 526 KB
- CS411 Highlighted Handouts by VU Sparky Highlighted PDF 5.9 MB
- CS411 GDB Solution 2022 by Dont Disturb Me GDB PDF 269 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.