Lecture 17 A

Create Questions

Submitted Questions

Displaying 1 - 10 of 10

What will be the output of the following C code?

#include <stdio.h>

#include <stdarg.h>

int f(char c, ...);

int main()

{

char c = 97, d = 98;

f(c, d);

return 0;

}

2 viewscreated by   on Sat, 06/13/2020 - 15:24

Which of the following macro extracts an argument from the variable argument list (ie ellipsis) and advance the pointer to the next argument?

1 viewcreated by   on Sat, 06/13/2020 - 15:21

What will be the output of the following C code?

printf(“\n Output: %5d \t %x \t %#x”, 234,234,234);

3 viewscreated by   on Sat, 06/13/2020 - 15:17

What will be the output of the following C code?

char str[] = &quot;Hello Nancy“;

printf(“\n %.7s”, str) ;

63 viewscreated by   on Sat, 06/13/2020 - 15:15

What will be the output of the program

#include<stdio.h>

void fun(int);

int main(int argc)

{

printf("%d ", argc);

1 viewcreated by   on Sat, 06/13/2020 - 15:09

 In linux, argv[0] by command-line argument can be occupied by _________

1 viewcreated by   on Sat, 06/13/2020 - 14:56

Which of the following syntax is correct for command-line arguments?

1 viewcreated by   on Sat, 06/13/2020 - 14:55

What is the index of the last argument in command line arguments?

1 viewcreated by   on Sat, 06/13/2020 - 14:53

What will be the output of the following C code (if run with no options or arguments)?

#include <stdio.h>

int main(int argc, char *argv[])

{

printf("%d\n", argc);

return 0;

}

1 viewcreated by   on Sat, 06/13/2020 - 14:51

What will be the output of the following C code (run without any command line arguments)?

#include <stdio.h>

int main(int argc, char *argv[])

{

while (argv != NULL)

printf("%s\n", *(argv++));

5 viewscreated by   on Sat, 06/13/2020 - 14:49