bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

luc069.c (979B)


      1 /*
      2  * Author  : Amit Dutta <amitdutta4255@gmail.com>
      3  * Date    : 08 Feb 2026
      4  * Repo    : https://github.com/notamitgamer/bsc
      5  * License : MIT License (See the LICENSE file for details)
      6  */
      7 
      8 /* If the string "Alice in wonder land" is fed to the following scanf() statement, what will be the contents of arrays str1, str2, str3 and str4?
      9 */
     10 
     11 /* Let Us C, Chap- 15 (Strings), Qn No.: C(a) */
     12 
     13 /* This file is auto-generated by a bot. */
     14 /* This code is not compiled; it is for reference only. */
     15 
     16 
     17 #include <stdio.h>
     18 #include <string.h>
     19 #include <stdlib.h>
     20 
     21 int main()
     22 {
     23     char str1[20], str2[20], str3[20], str4[20];
     24 
     25     printf("Enter the string 'Alice in wonder land': ");
     26     /* scanf stops reading at the first whitespace character for %s */
     27     scanf("%s%s%s%s", str1, str2, str3, str4);
     28 
     29     printf("\nContents of arrays:\n");
     30     printf("str1: %s\n", str1);
     31     printf("str2: %s\n", str2);
     32     printf("str3: %s\n", str3);
     33     printf("str4: %s\n", str4);
     34 
     35     return 0;
     36 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror