-
-
If the following program (myprog) is run from the command line as myprog monday tuesday wednesday thursday What would be the output? main(int argc, char *argv[]) { while(--argc >0) printf("%s",*++argv); }
A) myprog monday tuesday wednesday thursdayB) monday tuesday wednesday thursdayC) mondaytuesdaywednesdaythursdayD) myprog tuesday thursday
-
According to ANSI specifications which is the correct way of declaring main() when it receives command line arguments?
A) main(int argc, char *argv[]) B) main(argc,argv) int argc; char *argv[];C) main() {int argc; char *argv[]; }D) None of the above
-
-
-
-
-
-
-
-
-
-
-
-
Need help in writing a C program using array and loop statement
Write a C program using arrays and any loop statements that asks the user to enter the number of students. For each student, enter the number of courses. The user should enter the students ID number and the marks for each course. Compute and display the total and average of the students marks.
Sample Output:
Enter the number of students: 2
Enter Student ID No. 1: 082367
Enter... -
-
Here , you have the base address of array i.e. str.
By using only one pointer variable, you have to replace the occurrence of 'L' with '$$'. (after replacement, it should be DO$$$$AR)
can any body suggest efficient method? ">Char str[]="DOLLAR";Here , you have the base address of array i.e. str.By using only one pointer variable, you have to replace the occurrence of 'L' with '$$'. (after replacement, it should be DO$$$$AR)can any body suggest efficient method?
-
-
-
C Interview Questions
Ans