Title: Test quiz
Course: Backup and restore test course

void printStringLengths(int numStrings, char **strings) { for (int i=0; i < numStrings; i++) { printf("%ld\n", strlen(strings[i])); } }

print("Hello")

int sqr(int n) {
return n * n;
}

#include int main() { char buff[81]; char c = 0; int done = 0; while (!done) { char* buffptr = buff; while ((c = getchar()) != '\n' && c != EOF) { *buffptr++ = c; } done = c == EOF; while (buffptr > buff) { buffptr--; putchar(*buffptr); } putchar('\n'); } }

class Bod {
String name;
int age;
public Bod(String n, int a) {
name = n;
age = a;
}

public String getName() {
return name;
}

public int getAge() {
return age;
}

public void growOlder(int nYears) {
age += nYears;
}
}

int sumSquares(int[] data) {
int total = 0;
for (int n: data) {
total += n * n;
}
return total;
}

import java.util.Scanner;

public class SumCommaSeparatedIntegers {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

while (scanner.hasNextLine()) {
String line = scanner.nextLine();

// Check if the line is blank
if (line.trim().isEmpty()) {
break;
}

// Split the line by commas and calculate the sum
String[] numbers = line.split(",");
int sum = 0;

try {
for (String numStr : numbers) {
sum += Integer.parseInt(numStr.trim());
}
System.out.println(sum);
} catch (NumberFormatException e) {
System.err.println("Error: Invalid number format in line: " + line);
}
}

scanner.close();
}
}

def print_sqrs_1_to_n(n):
for i in range(1, n + 1):
print(f"{i} * {i} = {i * i}")

def sqr(n):
return n * n

while 1:
name = input()
if name:
name = name.split()[0]
if name.lower() == 'bye':
break
if name.lower() == 'richard':
print("Welcome", name)
else:
print("Hi", name)