to print a pyramid

 to print a pyramid

#include<stdio.h>
#include<conio.h>
void main()
{
int a,i,j,k,l;
clrscr();
printf("Enter Number Of Term for Print Pyramid = ");
scanf("%d",&a);
for(i=0;i<=a-1;i++)
{
for(j=i;j<=a-1;j++)
{
printf(" ");
}
for(k=0;k<=i;k++)
{
printf("*");
}
for(l=i;l>0;l--)
{
printf("*");
}
printf("\n");
}
getch();
}

I you want to propose a Girl here's how you do it ?

 I you want to propose a Girl here's

how you do it ?
/*Program to Propose a girl*/
#include<STD ISD PCO.h>
#include <mobile.h>
... #include<sms.h>
#include<love.h>
#define Cute beautiful_lady
main()
{
...
goto college;
scanf("100%",&ladies);
if(lady ==Cute)
line++;
while( !reply )
{
printf("I Love U");
scanf("100%",&reply);
}
if(reply == "GAALI")
main(); /* go back and repeat the
process */
else if(reply == "SANDAL ")
exit(1);
else if(reply == "I Love U")
{
lover =Cute ;
love = (heart*)malloc(sizeof(lover));
}
goto restaurant;
restaurant:
{
food++;
smile++;
pay->money = lover->money;
return(college);
}
if(time==2.30)
goto cinema;
cinema:
{
watch++;
if(intermission)
{
coke++;
Popecorn++;
}
}
}See More

What will be output?

What will be output?
void main ()
{
int a=7;
{
int a=10;
a++;
printf ("%d",a);
}
clrscr ();
printf ("%d",a);
getch ();
}
(1). 7
(2). 10
(3). 11,7

(4). 7,11 

Assume int is 4 bytes, char is 1 byte and float is 4 bytes. Also, assume that pointer size is 4 bytes (i.e. typical case)

 Assume int is 4 bytes, char is 1 byte and float is 4 bytes. Also, assume that pointer size is 4 bytes (i.e. typical case)

char *pChar;
int *pInt;
float *pFloat;
sizeof(pChar);
sizeof(pInt);
sizeof(pFloat);
What’s the size returned for each of sizeof() operator?
A) 4 4 4
😎 1 4 4
C) 1 4 8
D) None of the above





Suppose that in a C program snippet, followings statements are used.
i) sizeof(int);
ii) sizeof(int*);
iii) sizeof(int**);
Assuming size of pointer is 4 bytes and size of int is also 4 bytes, pick the most correct answer from the given options.
A:-- Only i) would compile successfully and it would return size as 4.
B:-- i), ii) and iii) would compile successfully and size of each would be same i.e. 4
C:-- i), ii) and iii) would compile successfully but the size of each would be different and would be decided at run time.
D:-- ii) and iii) would result in compile error but i) would compile and result in size as 4.

Choose the correct statement w.r.t. above C program.

 #include <stdlib.h>

int main()
{
int *pInt;
int **ppInt1;
int **ppInt2;
pInt = (int*)malloc(sizeof(int));
ppInt1 = (int**)malloc(10*sizeof(int*));
ppInt2 = (int**)malloc(10*sizeof(int*));
free(pInt);
free(ppInt1);
free(*ppInt2);
return 0;
}
Choose the correct statement w.r.t. above C program.
A) malloc() for ppInt1 and ppInt2 isn’t correct. It’ll give compile time error.
😎 free(*ppInt2) is not correct. It’ll give compile time error.
C) free(*ppInt2) is not correct. It’ll give run time error.
D) No issue with any of the malloc() and free() i.e. no compile/run time error.
11

Choose the function name that should be used in the blank space of line marked as Statement-5 to create the desired CSV File?

 Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.


CSV File 

1,AKSHAY,XII,A 

2,ABHISHEK,XII,A 

3,ARVIND,XII,A 

4,RAVI,XII,A 

5,ASHISH,XII,A


Incomplete Code import_____ #Statement-1 

fh = open(_____, _____, newline='') #Statement-2

 stuwriter = csv._____ #Statement-3 

data = [] 

header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION'] 

data.append(header) 

for i in range(5): 

roll_no = int(input("Enter Roll Number : ")) 

name = input("Enter Name : ") 

Class = input("Enter Class : ")

 section = input("Enter Section : ") 

rec = [_____] #Statement-4 

data.append(rec) 

stuwriter. _____ (data) #Statement-5

 fh.close() 

*******************************************

Choose the function name that should be used in the blank space of line marked as Statement-5 to create the desired CSV File? 

a) dump() 

b) load() 

c) writerows() 

d) writerow() 

Correct Answer : c) writerows() 

Identify the suitable code for blank space in line marked as Statement-4

 Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.


CSV File 

1,AKSHAY,XII,A 

2,ABHISHEK,XII,A 

3,ARVIND,XII,A 

4,RAVI,XII,A 

5,ASHISH,XII,A


Incomplete Code import_____ #Statement-1 

fh = open(_____, _____, newline='') #Statement-2

 stuwriter = csv._____ #Statement-3 

data = [] 

header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION'] 

data.append(header) 

for i in range(5): 

roll_no = int(input("Enter Roll Number : ")) 

name = input("Enter Name : ") 

Class = input("Enter Class : ")

 section = input("Enter Section : ") 

rec = [_____] #Statement-4 

data.append(rec) 

stuwriter. _____ (data) #Statement-5

 fh.close() 

*******************************************

Identify the suitable code for blank space in line marked as Statement-4. 

a) 'ROLL_NO', 'NAME', 'CLASS', 'SECTION' 

b) ROLL_NO, NAME, CLASS, SECTION 

c) 'roll_no','name','Class','section' 

d) roll_no,name,Class,sectionc) co.connect() 

Correct Answer : 

d) roll_no,name,Class,section

Choose the function name (with argument) that should be used in the blank space of line marked as Statement-3

Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.


CSV File 

1,AKSHAY,XII,A 

2,ABHISHEK,XII,A 

3,ARVIND,XII,A 

4,RAVI,XII,A 

5,ASHISH,XII,A


Incomplete Code import_____ #Statement-1 

fh = open(_____, _____, newline='') #Statement-2

 stuwriter = csv._____ #Statement-3 

data = [] 

header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION'] 

data.append(header) 

for i in range(5): 

roll_no = int(input("Enter Roll Number : ")) 

name = input("Enter Name : ") 

Class = input("Enter Class : ")

 section = input("Enter Section : ") 

rec = [_____] #Statement-4 

data.append(rec) 

stuwriter. _____ (data) #Statement-5

 fh.close() 

*******************************************

Choose the function name (with argument) that should be used in the blank space of line marked as Statement-3

 a) reader(fh) 

b) reader(MyFile) 

c) writer(fh) 

d) writer(MyFile) 

Correct Answer : c) writer(fh) 

Identify the missing code for blank space in line marked as Statement-2?

 Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.


CSV File 

1,AKSHAY,XII,A 

2,ABHISHEK,XII,A 

3,ARVIND,XII,A 

4,RAVI,XII,A 

5,ASHISH,XII,A


Incomplete Code import_____ #Statement-1 

fh = open(_____, _____, newline='') #Statement-2

 stuwriter = csv._____ #Statement-3 

data = [] 

header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION'] 

data.append(header) 

for i in range(5): 

roll_no = int(input("Enter Roll Number : ")) 

name = input("Enter Name : ") 

Class = input("Enter Class : ")

 section = input("Enter Section : ") 

rec = [_____] #Statement-4 

data.append(rec) 

stuwriter. _____ (data) #Statement-5

 fh.close() 

*******************************************

Identify the missing code for blank space in line marked as Statement-2? 

a) "School.csv","w" 

b) "Student.csv","w" 

c) "Student.csv","r" 

d) "School.csv","r" 

Correct Answer : b) "Student.csv","w" 

Identify the suitable code for blank space in line marked as Statement-1

 Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.


CSV File 

1,AKSHAY,XII,A 

2,ABHISHEK,XII,A 

3,ARVIND,XII,A 

4,RAVI,XII,A 

5,ASHISH,XII,A


Incomplete Code import_____ #Statement-1 

fh = open(_____, _____, newline='') #Statement-2

 stuwriter = csv._____ #Statement-3 

data = [] 

header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION'] 

data.append(header) 

for i in range(5): 

roll_no = int(input("Enter Roll Number : ")) 

name = input("Enter Name : ") 

Class = input("Enter Class : ")

 section = input("Enter Section : ") 

rec = [_____] #Statement-4 

data.append(rec) 

stuwriter. _____ (data) #Statement-5

 fh.close() 

*******************************************

Identify the suitable code for blank space in line marked as Statement-1.

 a) csv file

 b) CSV

 c) csv 

d) Csv 

Correct Answer : c) csv