my questions
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;
}
int f(char c, ...)
{
va_list li;
va_start(li, c);
char d = va_arg(li, int);
printf("%c\n", d);
va_end(li);
}
view Lecture 17 A created on Sat, 06/13/2020 - 15:24Which of the following macro extracts an argument from the variable argument list (ie ellipsis) and advance the pointer to the next argument?
view Lecture 17 A created on Sat, 06/13/2020 - 15:21What will be the output of the following C code?
printf(“\n Output: %5d \t %x \t %#x”, 234,234,234);
view Lecture 17 A created on Sat, 06/13/2020 - 15:17What will be the output of the following C code?
char str[] = "Hello Nancy“;
printf(“\n %.7s”, str) ;
view Lecture 17 A created on Sat, 06/13/2020 - 15:15What will be the output of the program
#include<stdio.h>
void fun(int);
int main(int argc)
{
printf("%d ", argc);
fun(argc); return 0;
}
void fun(int i)
{
if(i!=4) main(++i);
}
In linux, argv[0] by command-line argument can be occupied by _________
view Lecture 17 A created on Sat, 06/13/2020 - 14:56Which of the following syntax is correct for command-line arguments?
view Lecture 17 A created on Sat, 06/13/2020 - 14:55What is the index of the last argument in command line arguments?
view Lecture 17 A created on Sat, 06/13/2020 - 14:53What 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;
}
view Lecture 17 A created on Sat, 06/13/2020 - 14:51What 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++));
return 0;
}
view Lecture 17 A created on Sat, 06/13/2020 - 14:49Suppose that a bus has 16 data lines and requires 4 cycles of 250 nsecs each to transfer data. The bandwidth of this bus would be 2 Megabytes/sec. If the cycle time of the bus was reduced to 125 nsecs and the number of cycles required for transfer stayed the same what would the bandwidth of the bus?
view Lecture 2 created on Sat, 06/13/2020 - 14:06The private space gets allocated to each sub routine when_________________________.
view Lecture 16 created on Sat, 06/13/2020 - 13:41If, the sub routine exceeds the private space allocated to it then the values are pushed onto ___________
view Lecture 16 created on Sat, 06/13/2020 - 13:38How do caller and callee functions use same registers without interference?
view Lecture 16 created on Sat, 06/13/2020 - 12:37Where does callee function store its local variables?
view Lecture 16 created on Sat, 06/13/2020 - 12:35