0% found this document useful (0 votes)
16 views1 page

Question Set7 - C

This document contains a set of questions related to C programming. The questions cover topics like arrays, pointers, strings and more. Each question is numbered and has multiple choice answers. The questions test understanding of fundamental C concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Question Set7 - C

This document contains a set of questions related to C programming. The questions cover topics like arrays, pointers, strings and more. Each question is numbered and has multiple choice answers. The questions test understanding of fundamental C concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Question Set:7

By Rabi Shaw P.No:9007960872


1. int arr[6]={20,25}; 10. void main()
clrscr(); {
printf(“%d %d %d”,arr[2],arr[3],arr[4]); int x=5;
} char a[x]={‘a’,’b’,’c’};
printf(“%c”,++1[a]);
2. main() }
{
static int a[20]; 11. rray name+1=Address of the next
int i=0; element;
a[i]=i++;
printf("\n %d %d %d",a[0],a[1],i); 12. void main()
} {
char a[4]=”Rabi”;
char b[]=”AIEMD”;
3. void main() printf(“%d %d”,sizeof(a),sizeof(b)); }
{
int a[]={1,2,3,4,5,6,7,8,9}; 13. #include<stdio.h>
printf(“%d”,a[2,3,4]); main()
} {
char s1[]="Ramco";
4. void main() char s2[]="Systems";
{ s1=s2;
int a[3][10]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; printf("%s",s1);
printf(“%d”,sizeof(1); }
}
14. main()
5. int a[][3]={1,3,5,4,7,9}; {
printf(“%d%d”,*(*(a+0)+0),*(*(a+1)+1)); char *g="string";
strcpy(gxxx(),g);
6. int a[]={1,2,3,4,5}; g = gxxx();
printf(“%d”,&a[5]-&a[1]); strcpy(g,"oldstring");
printf("The string is : %s",gxxx());
7. Is the following }
statement a declaration/definition. a) The string is : string
Find what does it mean? b) The string is :Oldstring
int (*x)[10]; c) Run time error/Core dump
d) Syntax error during compilation
8. void main() { e) None of these
int a[5];
a[-2]=5, a[2]=1;
printf(“%d”,-2[a]); }

9. void main() {
int a[]={4,5,6,7,8},i,*p;
for(p=a+4,i=2;i<=4;i++)
printf(“%d”,p[-i]);
}

You might also like