PROGRAMMING II by Dataman
PROGRAMMING II by Dataman
SECTION B
ANSWER ALL QUESTIONS IN THIS SECTION
D. None of These
1. Determine output: 3. Determine the Final Output:
void main ()
void main ()
{ {
int const *p=5;
printf("%d", ++(*p)); printf("\nab");
} printf("\bsi");
A. 6
B. 5 printf("\rha");
C. Garbage Value }
D. Compiler Error
A. absiha
B. asiha
2. Determine Output:
void main() C. haasi
{
D. hai
char s[]="man";
int i; 4. What is the primary purpose of a function
for(i=0; s[i]; i++) prototype in C?
printf("%c%c%c%c ", s[i], *(s+i), *(i+s),
A. Declare a variable
i[s]);
} B. Declare a function
A. mmm nnn aaa
C. Define a function
B. mmmm nnnn aaaa
C. Compiler Error D. Assign a value
5. Which character is used to indicate the end of a
statement?
A. .
10.What is the maximum value that can be stored in
B. ; a byte variable in Java?
C. : A. 127
D. , B. 255
6. Which data type is used to represent a single C. 32767
character in C?
D. 64
A. char
11.Which data type is used to store a single
B. int character in Java?
C. float A. char
D. double B. string
7. What is the correct syntax for declaring a variable C. letter
in C?
D. ch
A. int variable_name;
12. Which programming tool is primarily used for
B. variable_name = 5; Android development?
SECTION B
(60 Marks)
………………………………………………………………………………………
………………………………………………………………………………………
……………………………………………………………………………………… 18. Compare and contrast Android and iOS application
……………………………………………………………………………………… development (15marks)
……………………………………………………………………………………… ………………………………………………………………………………………
…………………………………………………………………………………….. ………………………………………………………………………………………
………………………………………………………………………………………
………………………………………………………………………………………
………………………………………………………………………………………
……………………………………………………………………………………..
16. What are the key components of an Android
application? (5marks)
………………………………………………………………………………………
………………………………………………………………………………………
………………………………………………………………………………………
………………………………………………………………………………………
………………………………………………………………………………………
……………………………………………………………………………………..
BOLGATANGA TECHNICAL UNIVERSITY
SCHOOL OF APPLIED SCIENCE AND ARTS
DEPARTMENT OF COMPUTING & INFORMATION TECHNOLOGY
END OF FIRST SEMESTER EXAMINATION 2024/2025
DCN212: PROGRAMMING II MOBILE DEVICES PROGRAMMING
MARKING SCHEME
Q1. =D (3marks)
Q2. =D (3marks)
Q3. =D (3marks)
Q4 .= B (3marks)
Q5. =B (3marks)
Q6 .= A (3marks)
Q7 =A (3marks)
Q8 .= A (3marks)
Q9. =B (3marks)
Q10. = A Solution (3marks)
In Java, the byte data type is a signed 8-bit integer type. Being signed means that it can represent both
positive and negative values. The maximum value that can be stored in a byte variable is 127.
In binary, with 7 bits, you can represent numbers from 0 to 127. The highest bit (leftmost bit) is used for
sign, where 0 represents positive and 1 represents negative.
Q11. =A Solution: (3marks)
In Java, the char data type is used to store a single character. It can hold any single Unicode character,
including letters, digits, and special symbols. Choices C and D are not valid data types in Java.
Q12. = C (3marks)
Q13. = A (2marks)
Q14. = B It includes a set of tools for building Android applications. (2marks)
Q15. = Answer: Native apps are built specifically for a particular platform using platform-specific languages (e.g.,
Kotlin for Android, Swift for iOS), while web apps are platform-independent and run on web browsers using HTML,
CSS, and JavaScript.
Q18. = Solution:
- Android uses Kotlin/Java and Android Studio, while iOS uses Swift and Xcode.
- Android apps are distributed via Google Play Store, while iOS apps use the App Store.
- iOS development often involves stricter guidelines and higher development costs.
Comparison points: 10 Marks
Structure and examples: 5 Marks
Q19. = Solution: APK stands for "Android Package Kit." It is the file format used by Android operating systems to
distribute and install applications. Each APK file contains all the program’s code (such as .dex files), resources,
assets, certificates, and manifest file. Developers use APKs to package their apps for installation on Android devices,
and end users typically download these files from app stores like Google Play. Understanding APKs is crucial for
Android developers as it ensures the proper functioning and distribution of their applications. (10marks)
Q20. = Explanation: Data structure is a way to store and organize data efficiently, enhancing access and
manipulation, unlike programming languages, algorithms, or computer hardware. (10marks)