<<= Back Next =>>
You Are On Multi Choice Question Bank SET 177

8851. What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample 1 2 3 cmd> sample 2 2 3 cmd> sample 3 2 3 / sample.c / #include<stdio.h> int main(int argc, char argv[]) { printf("%s\n", argv[0]); return 0; }





8852. What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog 1 2 3 / myprog.c / #include<stdio.h> #include<stdlib.h> int main(int argc, char argv) { int i, j=0; for(i=0; i<argc; i++) j = j+atoi(argv[i]); printf("%d\n", j); return 0; }





8853. What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample friday tuesday sunday / sample.c / #include<stdio.h> int main(int sizeofargv, char argv[]) { while(sizeofargv) printf("%s", argv[--sizeofargv]); return 0; }





8854. What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample friday tuesday sunday / sample.c / #include<stdio.h> int main(int argc, char argv[]) { printf("%c", ++argv[2] ); return 0; }





8855. What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog 10 20 30 / myprog.c / #include<stdio.h> int main(int argc, char argv) { int i; for(i=0; i<argc; i++) printf("%s\n", argv[i]); return 0; }





8856. What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog one two three / myprog.c / #include<stdio.h> #include<stdlib.h> int main(int argc, char argv) { int i; for(i=1; i<=3; i++) printf("%u\n", &argv[i]); return 0; } If the first value printed by the above program is 65517, what will be the rest of output?





8857. Which of the following is TRUE about argv?





8858. Which of the following statements are FALSE about the below code? int main(int ac, char av[]) { }





8859. Every time we supply new set of values to the program at command prompt, we need to recompile the program.



8860. Even if integer/float arguments are supplied at command prompt they are treated as strings.



8861. The first argument to be supplied at command-line must always be count of total arguments.



8862. In Turbo C/C++ under DOS if we want that any wild card characters in the command-line arguments should be appropriately expanded, are we required to make any special provision?



8863. If the different command line arguments are supplied at different times would the output of the following program change? #include<stdio.h> int main(int argc, char argv) { printf("%d\n", argv[argc]); return 0; }



8864. Does there exist any way to make the command-line arguments available to other functions without passing them as arguments to the function?



8865. The maximum combined length of the command-line arguments including the spaces between adjacent arguments is





8866. According to ANSI specifications which is the correct way of declaring main when it receives command-line arguments?





8867. Pancreas secretes hormones which help in?





8868. Who was the Governor of the English during the carnatic wars?





8869. The reactions taking place in solar and stellar atmospheres are





8870. The earliest seeds of the Bhakti movement in India are found in





8871. Declare the following statement? "A pointer to a function which receives an int pointer and returns float pointer".





8872. What do the following declaration signify? void cmp();





8873. Declare the following statement? "A pointer to a function which receives nothing and returns nothing".





8874. What do the following declaration signify? int f();





8875. What do the following declaration signify? void (cmp)();





8876. What do the following declaration signify? char argv;





8877. What do the following declaration signify? char scr;





8878. What will be the output of the program? #include<stdio.h> int main() { char far near ptr1; char far far ptr2; char far huge ptr3; printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3)); return 0; }





8879. What will be the output of the program in DOS (Compiler - Turbo C)? #include<stdio.h> double i; int main() { (int)(float)(char) i; printf("%d", sizeof((int)(float)(char)i)); return 0; }





8880. What will be the output of the program? #include<stdio.h> int main() { char huge near far ptr1; char near far huge ptr2; char far huge near ptr3; printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3)); return 0; }





8881. What will be the output of the program (in Turbo C under DOS)? #include<stdio.h> int main() { char huge near far ptr1; char near far huge ptr2; char far huge near ptr3; printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3)); return 0; }





8882. What will be the output of the program? #include<stdio.h> typedef void v; typedef int i; int main() { v fun(i, i); fun(2, 3); return 0; } v fun(i a, i b) { i s=2; float i; printf("%d,", sizeof(i)); printf(" %d", abs); }





8883. Gujarat was traditionally known as?





8884. What will be the output of the program? #include<stdio.h> typedef unsigned long int uli; typedef uli u; int main() { uli a; u b = -1; a = -1; printf("%lu, %lu", a, b); return 0; }





8885. What will be the output of the program in DOS (Compiler - Turbo C)? #include<stdio.h> double i; int main() { (int)(float)(char) i; printf("%d",sizeof(i)); return 0; }





8886. What will be the output of the program under DOS? #include<stdio.h> int main() { char huge near far ptr1; char near far huge ptr2; char far huge near ptr3; printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3)); return 0; }





8887. What will be the output of the program? #include<stdio.h> int main() { struct s1 { char z; int i; struct s1 p; }; static struct s1 a[] = {{"Nagpur", 1, a+1} , {"Chennai", 2, a+2} , {"Bangalore", 3, a} }; struct s1 ptr = a; printf("%s,", ++(ptr->z)); printf(" %s,", a[(++ptr)->i].z); printf(" %s", a[--(ptr->p->i)].z); return 0; }





8888. What will be the output of the program? #include<stdio.h> int main() { char huge near ptr1; char huge far ptr2; char huge huge ptr3; printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3)); return 0; }





8889. What will be the output of the program in Turbo C? #include<stdio.h> int main() { char near near ptr1; char near far ptr2; char near huge ptr3; printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3)); return 0; }





8890. Point out the error in the following program (in Turbo C under DOS). #include<stdio.h> union emp { int empno; int age; }; int main() { union emp e = {10, 25}; printf("%d %d", e.empno, e.age); return 0; }





8891. Point out the error in the following program. #include<stdio.h> #include<stdlib.h> int main() { static char p = (char )malloc(10); return 0; }





8892. Point out the error in the following program. #include<stdio.h> void display(int (ff)()); int main() { int show(); int (f)(); f = show; display(f); return 0; } void display(int (ff)()) { (ff)(); } int show() { printf("IndiaBIX"); }





8893. Does the data type of all elements in the union will be same.



8894. It is not necessary to typecast the address returned by malloc().



8895. We can modify the pointers "source" as well as "target".



8896. Function can return a floating point number.



8897. കടലാസുകൊണ്ട് വിവിധ കളിപ്പാട്ടങ്ങൾ ഉണ്ടാക്കുന്ന ജാപ്പനീസ് സമ്പ്രദായം? [Kadalaasukondu vividha kalippaattangal undaakkunna jaappaneesu sampradaayam?]





8898. We can allocate a 2-Dimensional array dynamically.



8899. Is the following declaration correct? typedef void (pfun)(int, float);



8900. Is the following declaration correct? char ( ( f())[])();



<<= Back Next =>>
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions