Total five questions. Each carry 1 Mark.
Total time 5 Min.
Quiz Summary
0 of 5 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 5 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
-
If you score less than 4 marks. Watch the videos again and take the test.
- 1
- 2
- 3
- 4
- 5
- Current
- Review
- Answered
- Correct
- Incorrect
-
Question 1 of 5
1. Question
Q1) What is the output displayed by the below program?
#include <stdio.h> int main(void) { char a[5]={'1','x','2'}; printf("%d",a[2]); return 0; }
CorrectIncorrect -
Question 2 of 5
2. Question
Q2) Assume int is given 2 bytes space for the array a[5][5].
Identify the memory location at which a[2][3] will be if row-major order is considered?The base address of the array a is given 2000 location by the compiler.
CorrectIncorrect -
-
Question 3 of 5
3. Question
Q3) What is the output displayed by the below program?
#include <stdio.h> int main(void) { int a[3][3]={1,2,3,4,5,6,7,8,9},i,j; for(i=0;i<3;i++) for(j=0;j<3;j++) { if(i>=j) { a[i][j]+=1; } } printf("%d",a[i][j]); return 0; }
CorrectIncorrect -
Question 4 of 5
4. Question
Q4) What is the output displayed by the below program?
#include <stdio.h> int main(void) { char p[20]={'r','e','s','p','e','c','t',' ','e','l','d','e','r','s','\0'}; char b[20]; int k=0; while(p[k]!='\0' && p[k]!=' ') { b[k]=p[k]; k++; } k=0; while(b[k]!='\0') { printf("%c",b[k]); k++; } return 0; }
CorrectIncorrect -
Question 5 of 5
5. Question
Q5) How many numbers of 1’s in the array a, after executing the below program?
#include <stdio.h> int main(void) { int a[4][5]={1,3,5,7,9},i=0,j=0; for(i=0;i<4;i++) for(j=0;j<5;j++) a[i][j]+=1; return 0; }
CorrectIncorrect