programming languages Online Quiz - 142
Description: programming languages Online Quiz - 142 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
Comments (Not remarks) should be in
While reading a SDF file, if AT END clause is skipped,
All subscripts should be defined as PIC ____?
Which of the following set of statements is correct as per standards?
In the ENVIRONMENT DIVISION which paragrahs should a program (not a subroutine) have?
#define T t void main() { char T=’T’; printf(“\n%c\t%c\n”,T,t); }
2) void main() { unsigned char a; a = 0XFF + 1; printf(“%d”,a); }
3) void main() { int x=10; (x<0) ? (int a = 100) : (int a=1000); printf(“%d”,a); }
main() { int *p1, i=25; void *p2; p1=&i; p2=&i; p1=p2; p2=p1; printf(“%d”,i); }
5) void swap(int &, int &); void main() { int a=10, b=20; swap(a++,b++); printf(“\n%d\t%d\t”,a,b); } void swap(int &x, int &y) { x+=2; y+=3; }
6) void abc(int a[]) { a++; a[1] = 612; } main() { char a[5]; abc(a); printf(“%d”,a[4]); }
7) main() { float me=1.1; double you=1.1; if(me = = you) printf(“I love u”); else printf(“I hate you”); }
main() { printf(“\nab”); printf(“\bsi”); printf(“\rha”); }
#define a 10 main() { #define a 50 printf(“%d”,a); }
main() { int i = 400, j = 300; printf(“%d %d”); } [in Turbo C complier]
1)main() { int i = 1, j = 2; switch(i) { case i: printf(“GOOD”); break; case j: printf(“BAD”); break; }; }
1)#define f(g,g2) g# #g2 main() { int var12 = 100; printf(“%d”,f(var,12)); }
1)main() { int i = -1, j= -1, k=0, l=2, m; m=i++&&j++&&k++||l++; printf(“%d %d %d %d %d”,i,j,k,l,m); }
1)main() { int i = 0; for( ; i++ ; printf(“%d”,i)); printf(“%d”,i); }
1)main() { printf(“%x”,-1<<4); }