ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Code Snippets  >>  Scripts_Markup Code  >>  VB Script Code
 
 


 

 
 PHP Code interview questions  PHP Code Interview Questions
 JSP Code interview questions  JSP Code Interview Questions
 ASP Code interview questions  ASP Code Interview Questions
 CGI Perl Code interview questions  CGI Perl Code Interview Questions
 JavaScript Code interview questions  JavaScript Code Interview Questions
 VB Script Code interview questions  VB Script Code Interview Questions
 Shell Script Code interview questions  Shell Script Code Interview Questions
 Python Code interview questions  Python Code Interview Questions
 WinRunner Code interview questions  WinRunner Code Interview Questions
 HTML DHTML XHTML Code interview questions  HTML DHTML XHTML Code Interview Questions
 XML interview questions  XML Interview Questions
 Scripts_Markup Code AllOther interview questions  Scripts_Markup Code AllOther Interview Questions
Question
how to write a program to accept names and marks of 10 
students from the user and display the names and markes of 
only the passed students.  Marks greater than or equal to 
35 is considered as pass.
 Question Submitted By :: Nl
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to write a program to accept names and marks of 10 students from the user and display the names and markes of only the passed students. Marks greater than or equal to 35 is considered as pass.
Answer
# 1
#include<stdio.h>
void main()
{
char names[10][20];
int a[10][2],n;
printf(":enter the number of students :");
scanf("%d",&n);
printf("enter the names and marks");
  for(int i=0;i<n;i++)
{
scanf("%s",names[i]);
scanf('%d",&a[i]);
}
printf("the passed students are :\n");
for(int i=0;i<n;i++)
{
  if(a[i]>=35)
{
printf("%s",names[i]);
}
}
getch();
}
 
Is This Answer Correct ?    2 Yes 1 No
Vignesh1988i
[Nil]
 
  Re: how to write a program to accept names and marks of 10 students from the user and display the names and markes of only the passed students. Marks greater than or equal to 35 is considered as pass.
Answer
# 2
// Student Processing
#include <iostream>
using namespace std;

class Stud
{
public:
	char name[20];
	int marks[6];
};
int main ()
{
  Stud s[11];int i,j,flag;
  cout<<"\nEnter Name ";
  for(i=0;i<10;i++)
	  cin>>s[i].name;
  cout<<"\n Enter 5 marks ";
  for(i=0;i<10;i++)
	  for(j=0;j<5;j++)
	  cin>>s[i].marks[j];
  for(i=0;i<10;i++)
  {flag=0;
	  for(j=0;j<5;j++)
		  if(s[i].marks[j]>=35)
			  flag++;
	if(flag==5)
		cout<<"\t"<<s[i].name;
  }
   
  return 0;
}
 
Is This Answer Correct ?    1 Yes 0 No
Abikrishna
 
 
 

 
 
 
Other VB Script Code Interview Questions
 
  Question Asked @ Answers
 
how to write a program to accept names and marks of 10 students from the user and display the names and markes of only the passed students. Marks greater than or equal to 35 is considered as pass.  2
How to write a reusable function for testing an "Button" Objects in a page without passing the page name to a function? (Think if page names are dynamic and doesn't have any pattern matching between each page). Send me code which works in QTP 9.2.....  2
How to write QTP script to exit from loop? suppose I am using parametize functionality and in data table there is 3 password corresponding 3 username and second pasword is wrong. Now I want to exit after completion of second iteration and continue with third iteration.  1
how to use textfile for taking value for parametrization instead of datatable or global sheet  2
 
For more VB Script Code Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com