August 30, 2016 0 Welcome to your Yippee Technology Online Aptitude Test on C, HTML and CSS Name void print(int n) { if (n == 0) return; printf("%d", n%2); print(n/2); } What will be the output of print(12). 1001 1000 0011 1100 how to set picture as a background web page ? HTML uses Pre-specified tags Fixed tags defined by the language User defined tags Tags only for linking How do you add a background color for all HTML elements? h1 {background-color:#FFFFFF; h1.all {background-color:#FFFFFF; all.h1 {background-color:#FFFFFF;} Consider c code int main(){ printf("%d",sizeof(3.8)); return 0; } Which of the following is true? 4 8 None of these Compiler Error 10 Which of the following is a way to associate styles with your HTML document? Embedded CSS - The Element None of the above. Inline CSS - The style Attribute Both of the above. Which of the following is an attribute of tag ? cellpadding src link Bold which HTML tag is used to display the power of any expression ? #include int main() { int a=10; void f(); a = f(); printf("%d\n", a); return 0; } void f() { printf("Hi"); } A. Error: Not allowed assignment B. Error: Doesn't print anything C. No error D. None of above B D A C what is empty elements in HTML an element with no tag an element with empty content an element with no comment an element with no attribute ..... tag is used for ______? None of these Table Record Table Heading Table Row Which of the following is illegal? int i; double* dp = &i; string s, *sp = 0; int *ip; int *pi = 0; Which of the following property is used to change the face of a font? font-weight font-style font-variant font-family HTML web pages can be read and rendered by _________. Server Compiler Interpreter Web Browser in HTML iframe is used to to display web page within a web page to display picture within a picture to display a table within a table to display link within a link which organization defines the web standards ? w3 World Wide Web Consortium Microsoft corporation IBM corporation choose the correct HTML tag to left align the content of cell horizontally ? None of these Which of the following is correct about Hex Code format of CSS colors? The next two are a green value(GG). The first two digits(RR) represent a red value. The last are the blue value(BB). All of above Which of the following property serves as shorthand for the padding properties? padding-left padding-right padding padding-top what is mean by alt value in tag ? Alternative source of image All of above Caption of image Alternative text of image What is the correct HTML for referring to an external style sheet? None of these C Which type of files can’t be opened using fopen()? .txt .c None of the mentioned .bin void main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); } aaaa mmmm nnnn mmm aa nnn mmmm aa nn mmmm aaaa nnnn How do you insert a comment in a CSS file? /* this is a comment */ // this is a comment Both A and B // this is a comment // What is use of \r in c? used to insert a tab used to insert a vertical tab places cursor at the end of line places cursor at the start of line Which of the following property allows you to control the shape or appearance of the marker of a list? list-style-position list-style-type list-style-image list-style What tag is used to display a picture in a HTML page? image img picture src What is the output of the following: #include int fun(int count) { printf("%d\n", count); if(count < 3) { fun(fun(fun(++count))); } return count; } int main() { fun(1); return 0; } A. 1 2 3 3 3 3 3 B. 1 2 3 C. 1 2 2 2 2 2 2 D. 1 2 C D B A Fundamental HTML Block is known as ___________. HTML Element HTML Tag HTML Attribute HTML Body Apart from tag, what other tag makes text bold ? How can you open a link in a new tab/browser window? What is return type of malloc() function? void void* int int* #include using namespace std; class B { public: void display() { cout<<"Content of base class.\n"; } }; class D : public B { public: void display() { cout<<"Content of derived class.\n"; } }; int main() { B *b; D d; b->display(); b = &d; /* Address of object d in pointer variable */ b->display(); return 0; } A.Content of base class. Content of base class. B.Content of base class. Conitent of derived class. C.Content of derived class. Content of base class. D.Conitent of derived class. Conitent of derived class. A B D C Which of the following property of a anchor element signifies an element that currently has the user's mouse pointer hovering over it? hover link visited active Which of the following selector selects all paragraph elements with a lang attribute? p[lang|="fr"] Show Answer p[lang~="fr"] p[lang] p[lang="fr"] If you want the table borders to collapse into one border, which property you will use ? border-collapse: -1; border-collapse: collapse; border-collapse: 0; border-collapse: none; Which of the following is correct about CSS? You can write CSS once and then reuse same sheet in multiple HTML pages. CSS is the acronym for "Cascading Style Sheet". All of the above. CSS is used to control the style of a web document in a simple and easy way. Size of void pointer is 1 byte 2 byte 4 byte 8 byte Which of the following selector matches all elements of a type? The Universal Selector The Type Selector The Descendant Selector The Class Selector How can you make a bulleted list with numbers? How do you display hyperlinks without an underline? a {underline:none} a {text-decoration:none} a {decoration:no underline} a {text-decoration:no underline} the element is container for webpages links pictures metadata #include #include int main(){ void (*p)(); int (*q)(); int (*r)(); p = clrscr; q = getch; r = puts; (*p)(); (*r)("cquestionbank.blogspot.com"); (*q)(); return 0; } (A) NULL (B) cquestionbank.blogspot.com (C) c (D) Compilation error (E) None of above B C D A #include main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); } 3hello n 3 hello Compiler error HTML is what type of language ? Programming Language Scripting Language Network Protocol Markup Language What is the output of this C code? void foo(float *); int main(){ int i = 10, *p = &i; foo(&i); } void foo(float *p) { printf("%f\n", *p); } Compile time error 10.000000 0.000000 Undefined behaviour Which of the following property is used to capitalize text or convert text to uppercase or lowercase letters? text-indent text-transform text-align text-decoration Tags and test that are not directly displayed on the page are written in _____ section. #include int main(){ int i,j; i=j=2,3; while(--i&&j++) printf("%d %d",i,j); return 0; } A.1 3 B.2 3 C.1 2 D.1 2 3 C D A B Which of the following property is used to increase or decrease how bold or light a font appears? font-style font-size font-variant font-weight Can you combine the following two statements into one? char *p; p = (char*) malloc(100); A. char p = *malloc(100); B. char *p = (char) malloc(100); C. char *p = (char*)malloc(100); D. char *p = (char *)(malloc*)(100); D B A C #define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); } sizeof(i)=2 sizeof(i)=1 sizeof(i)=65 Depends on compiler Time's up