S8-C Programming - MSS
S8-C Programming - MSS
Q7. What is the difference between IaaS, PaaS, and SaaS in cloud
computing?
A:IaaS (Infrastructure as a Service): Provides virtualized hardware like
servers, storage, and networking. (Example: AWS EC2)
Q8. What are microservices, and how are they different from monolithic
architecture?
Q10. What are the benefits of using Docker and containers in cloud
computing?
Why is it important?
Creational-singleton,Factory.
Structural-Adapter,composition
Behavioral-observer,strategy.
A: Software with source code that anyone can inspect, modify, and
distribute.
Q19.what are the differences b/w GPL, LGPL & BSD licenses.
Q22. Name any two software process models and briefly describe them.
A: Waterfall Model: This is a linear and sequential model where each
phase (requirement, design, implementation, testing, deployment,
maintenance) is completed before moving to the next phase.
A: In a while loop, the condition is checked before executing the loop body.
If the condition is false, the loop does not execute.
In a do-while loop, the loop body is executed at least once because the
condition is checked after execution.
Q2.How does the sizeof operator work, and when would you use it?
A: The sizeof operator returns the size (in bytes) of a data type or variable.
It is used to determine memory requirements.
Q3.What is the role of the break and continue statements in loop control?
Eg:
if (i == 3) break;
// Output: 0 1 2
continue: Skips the remaining code in the current iteration and moves to
the next iteration.
Eg:
if (i == 3) continue;
// Output: 0 1 2 4
Q4.What is an identifier, and what are the rules for naming it?
Rules:
A:Declaration:
int arr[5];
Initialization:
A:int matrix[3][3];
Q10: What happens if you access an index out of the array's bounds?
•declaration in c:
data_type *pointer_name;
Q12. What is the difference between pass by value and pass by reference
in C?
•example
#include <stdio.h>
void changeValue(int x) {
int main() {
int a = 5;
changeValue(a);
return 0;
•example:
#include <stdio.h>
int main() {
int a = 5;
changeValue(&a);
return 0;
•Types:
b.Open a file
e.Close a file
A:
"w": Open for writing. Creates a new file or truncates an existing file.
"a": Open for appending. Data is added to the end of the file.
"r+": Open for both reading and writing. File must exist.
"w+": Open for reading and writing. Creates a new file or truncates an
existing file.
A: