Given the following definition and initialization. Write a code fragment including a loop that will overwrite the string greeting, with ‘X’ in all character position, keeping the length the same.

What will be an ideal response?


The loop runs from 0 up to the position of the null character where the loop stops,
without overwriting the null terminator.
```
int index = 0;
while (greeting[index] != ‘\0’)
{
greeting[index] = ‘X’;
index++;
```

Computer Science & Information Technology

You might also like to view...

Padding is white space outside the box border.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Match the following keywords to their uses:

I. JOIN clause II. DISTINCT keyword III. Cross join query IV. UNION keyword V. ON keyword A. Used to combine one or more queries in a table B. Returns only a single instance of any duplicate values in query results C. Defines the join type for a query D. Used to specify which field is common to two tables E. Every possible combination of records between two related tables will be returned in the query results

Computer Science & Information Technology

Users have the ability to export records in a Form View to PDF

Indicate whether the statement is true or false

Computer Science & Information Technology

PKIs manage, store, and revoke digital certificates

Indicate whether the statement is true or false

Computer Science & Information Technology